This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$host='tcp:172.18.0.3,1433'; | |
$dbname='Master'; | |
$sa='sa'; | |
$pwd='yourStrong(!)Password'; | |
try { | |
//The caveat is that disabling MARS means you can only have one active statement/result at a time. So depending on how your PHP code is structured you could encounter errors when executing a second statement or accessing a result. | |
$dbDB = new PDO("sqlsrv:Server=$host;Database=$database;MultipleActiveResultSets=false", $sa, $pwd); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM php:7.0-apache | |
COPY src/ /var/www/html/ | |
# Add Microsoft repo for Microsoft ODBC Driver 13 for Linux | |
RUN apt-get update && apt-get install -y \ | |
apt-transport-https \ | |
gnupg \ | |
&& curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - \ | |
&& curl https://packages.microsoft.com/config/debian/9/prod.list > /etc/apt/sources.list.d/mssql-release.list \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//JQuery | |
function interate (arg) { | |
$.each(arg, function(index, value){ | |
isObjArr = Object.prototype.toString.call( value ); | |
if( isObjArr === '[object Object]' ) { | |
notThis = (index === 'this') ? "" : index; | |
console.log("found: object "+notThis); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#parent{ | |
position: relative | |
} | |
#parent .child{ | |
position: absolute; | |
bottom: 0; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//...code... | |
// USE: Post wall in facebook page | |
//controller fb_connect.php | |
public function __construct() | |
{ | |
$CI = & get_instance(); | |
$CI->config->load("facebook",TRUE); | |
$config = $CI->config->item('facebook'); | |
parent::__construct($config); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: | |
:: | |
:: GIFEncoder Version 2.0 by László Zsidi, http://gifs.hu | |
:: | |
:: This class is a rewritten 'GifMerge.class.php' version. | |
:: | |
:: Modification: | |
:: - Simplified and easy code, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<Event status="happened"> | |
<Song title="Physical"> | |
<Artist name="Olivia Newton John" ID="338221"> | |
</Artist> | |
<Info StartTime="21:44:11" JazlerID="4806" PlayListerID="" /> | |
</Song> | |
<Song title="Be My Baby"> | |
<Artist name="Vanessa Paradis" ID="336452"> | |
</Artist> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* Obtenemos $artista y $cancion enviados mediante jquery */ | |
$artista = urlencode($_GET['artista']); | |
$cancion = urlencode($_GET['cancion']); | |
/* Enviamos la peticion al sitio api.chartlyrics.com y este | |
nos responde con formato xml */ | |
$url = "http://api.chartlyrics.com/apiv1.asmx/SearchLyricDirect?artist=$artista&song=$cancion"; | |
$str = file_get_contents($url); | |
echo $str; | |
//RESULTADO http://img233.imageshack.us/img233/9224/65030479.jpg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
<title>Quis Nostrud</title> | |
<script src="http://code.jquery.com/jquery-latest.js"></script> | |
<style type="text/css"> | |
p{ | |
background-color:#FFFBDB; | |
padding:5px; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Para que muestre por pantalla el error mysql. | |
$numresults=mysql_query($query); | |
if (!$numresults){ | |
die (mysql_error()); | |
} | |
?> |
NewerOlder