This file contains hidden or 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
| function getNumPagesInPDF($file) | |
| { | |
| //http://www.hotscripts.com/forums/php/23533-how-now-get-number-pages-one-document-pdf.html | |
| if(!file_exists($file))return null; | |
| if (!$fp = @fopen($file,"r"))return null; | |
| $max=0; | |
| while(!feof($fp)) { | |
| $line = fgets($fp,255); | |
| if (preg_match('/\/Count [0-9]+/', $line, $matches)){ | |
| preg_match('/[0-9]+/',$matches[0], $matches2); |
This file contains hidden or 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
| INSERT INTO clientes_peticiones ( | |
| id_cliente,fecha,peticiones | |
| ) VALUES ( | |
| 1,'2011-11-02',1 | |
| ) ON DUPLICATE KEY UPDATE peticiones = peticiones+1; |
This file contains hidden or 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
| // Supposing your want to be sure that $string is composed by valid UTF-8 characters: | |
| $string = iconv("UTF-8","UTF-8//IGNORE",$string); | |
| // If you want to remove none ISO-8859-1 characters from this string: | |
| $string = iconv("UTF-8","ISO-8859-1//IGNORE",$string); | |
| $string = iconv("ISO-8859-1","UTF-8",$string); | |
| // If you still have characters you want to be ignored, try this: | |
| $string = recode_string("us..flat", $string); |
This file contains hidden or 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
| # La siguiente consulta añade un campo numerado a una consulta: | |
| set @num=0; | |
| select id, @num:=@num+1 AS contando FROM tabla; |
This file contains hidden or 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
| REM Combinar los archivos js de un directorio | |
| @echo off | |
| pushd "%~1" | |
| echo.>tmp.js | |
| del tmp.js | |
| for /r %%x in (*.js) do ( | |
| type "%%~x" >> tmp.js | |
| ) | |
| popd |
This file contains hidden or 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
| Select * FROM pedidos_lineas | |
| where id_pedido=33 | |
| order by find_in_set(color, (SELECT GROUP_CONCAT(DISTINCT(color)) FROM pedidos_lineas WHERE id_pedido=33)); |
This file contains hidden or 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
| SELECT DISTINCT files.contentType, IF ((SELECT COUNT(id) FROM files_favoritos)=0,'si','no') FROM files |
This file contains hidden or 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
| UPDATE Hoja1 origen, clientes_acceso destino | |
| SET destino.password = origen.NUEVA_CLAVE | |
| WHERE destino.IDusuario = origen.CODIGO; |
This file contains hidden or 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_value date.timezone UTC |
This file contains hidden or 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
| identify archivo.ext |
OlderNewer