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 | |
phpinfo(); |
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 | |
// Ejemplo en CONEXIÓN PDO | |
$db = new PDO("mysql:dbname=DB_NAME;host=localhost", USERNAME , PASSWORD); | |
$db->exec("SET NAMES utf8"); | |
//CONSULTAS | |
// El signo de interregación representa donde se colocara el dato | |
$stmt = $db->prepare('SELECT id, CI FROM habitantes WHERE CI= ?'); |
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 | |
$options = array( | |
"username" => "usuario", | |
"password" => "password", | |
"host" => "localhost", | |
"dbname" => "base de datos", | |
); | |
// Ejemplo en CONEXIÓN PDO | |
$db = new PDO("mysql:dbname=".$options["dbname"].";host=".$options["host"], $options["username"], $options["password"]); |
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 | |
// Alexa/Acl.php | |
/** | |
* Implentación de Zend_Acl | |
* | |
* Implentemación estática de Zend_Acl hecha para cumplir con el proposito | |
* del desarrollo. | |
* |
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 | |
class ImagesController extends Zend_Controller_Action | |
{ | |
// .... | |
private function _upload($imageName = null) | |
{ | |
$path = realpath(APPLICATION_PATH . '/../public/uploads/'); | |
/*RECIBIENDO IMAGEN*/ | |
$upload = new Zend_File_Transfer_Adapter_Http(); |
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 | |
class Bootstrap extends Zend_Application_Bootstrap_Bootstrap | |
{ | |
protected function _initResourceAutoloader() | |
{ | |
// Resgistrando el espacio de nombres vacío | |
$resourceAutoloader = new Zend_Loader_Autoloader_Resource(array( | |
'basePath' => APPLICATION_PATH, | |
'namespace' => '' | |
)); |
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
<html> | |
<head> | |
<!-- CONDICIONAL --> | |
<!--[if lt IE 9]> <link href="/assets/common/css/suggest.css" media="screen" rel="stylesheet" type="text/css" ><![endif]--> | |
</head> | |
<body> | |
<div class="content"> | |
<div class="row"> | |
<div class="span12"> | |
<div id="suggest" class="alert alert-error alert-block fade in"> |
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
<html> | |
<head> | |
<title>Contador de clicks</title> | |
<script> | |
var i = 0 | |
function clickLink() { | |
i++; | |
if (i == 1) { | |
document.getElementById("clicks").innerHTML = i; | |
} |
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
RewriteEngine On | |
RewriteRule ^\.htaccess$ - [F] | |
RewriteCond %{REQUEST_URI} ="" | |
RewriteRule ^.*$ /public/index.php [NC,L] | |
RewriteCond %{REQUEST_URI} !^/public/.*$ | |
RewriteRule ^(.*)$ /public/$1 |
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 | |
$contents = file_get_contents("https://chart.googleapis.com/chart?chs=150x150&cht=qr&chl=hola"); | |
echo '<img src="data:image/png;base64,'. base64_encode($contents) .'">'; |
OlderNewer