links for 2007-05-19
-
Smarty es un motor de plantillas Open Source para PHP que lleva muchos años en el mercado. Con él podremos realizar aplicaciones web de calidad separando el código (PHP) de la presentación (HTML/CSS).
The HTML5 test score is an indication of how well your browser supports the upcoming HTML5 standard and related specifications. Despite these shortcomings they hope that by quantifying the level of support users and web developers will get an idea of how hard the browser manufacturers work on improving their browsers and the web as a development …
Uno de los problemas con los que nos solemos encontrar es leer imágenes en PHP mediante la librería GD sin estar seguros de que tipo de fichero es: JPEG, GIF o PNG. Normalmente solemos mirar la extensión y según sea, abrir el fichero con alguno de los métodos que ofrece GD. Pero hay una solución más sencilla: leer el fichero en un string y crear la imagen usando ese script:
$img_content = file_get_contents($image);
$im = imagecreatefromstring($img_content);
// Para saber el tipo de imagen por si lo necesitamos
$imgtype = exif_imagetype($image);