SlideShare una empresa de Scribd logo
1 de 1063
Descargar para leer sin conexión
Manual de PHP 
Stig Sæther Bakken 
Alexander Aulbach 
Egon Schmid 
Jim Winstead 
Lars Torben Wilson 
Rasmus Lerdorf 
Zeev Suraski 
Andrei Zmievski 
Jouni Ahto 
Editado por 
Rafael Martínez
Manual de PHP 
por Stig Sæther Bakken, Alexander Aulbach, Egon Schmid, Jim Winstead, Lars Torben Wilson, Rasmus Lerdorf, Zeev Suraski, 
Andrei Zmievski, y Jouni Ahto 
Editado por Rafael Martínez 
Publicado 15-04-2001 
Copyright © 1997, 1998, 1999, 2000, 2001 por por el Grupo de documentación de PHP 
Copyright 
Este manual es © Copyright 1997, 1998, 1999, 2000, 2001 del Grupo de documentación de PHP. Los miembros de este grupo se 
encuentran listados en la primera página de este manual. 
Este manual puede ser redistribuido bajo los términos de la "GNU General Public License"publicada por la "Free Software 
Foundation"; tanto bajo la versión 2 de esta licencia o bajo versiones posteriores.
Tabla de contenidos 
Prefacio ..................................................................................................................................................................................41 
Sobre este Manual.........................................................................................................................................................41 
Sobre la traducción .......................................................................................................................................................41 
I. Conceptos Básicos .............................................................................................................................................................43 
1. Introducción ..............................................................................................................................................................43 
Qué es PHP?........................................................................................................................................................45 
Qué se puede hacer con PHP?.............................................................................................................................45 
Corta historia de PHP..........................................................................................................................................45 
2. Instalación .................................................................................................................................................................47 
Bajándose la última versión ................................................................................................................................49 
Instalación en sistemas UNIX.............................................................................................................................49 
Instrucciones Rápidas de Instalación (Versión Módulo de Apache) .........................................................49 
Configuración ............................................................................................................................................49 
Módulo del Apache....................................................................................................................................50 
Módulo fhttpd ............................................................................................................................................50 
CGI version................................................................................................................................................50 
Opciones de soporte para Base de Datos...................................................................................................50 
Adabas D..........................................................................................................................................50 
dBase................................................................................................................................................50 
filePro ...............................................................................................................................................50 
mSQL...............................................................................................................................................51 
MySQL.............................................................................................................................................51 
iODBC .............................................................................................................................................51 
OpenLink ODBC .............................................................................................................................51 
Oracle ...............................................................................................................................................51 
PostgreSQL ......................................................................................................................................52 
Solid .................................................................................................................................................52 
Sybase ..............................................................................................................................................52 
Sybase-CT........................................................................................................................................52 
Velocis ..............................................................................................................................................52 
Una librería a medida de ODBC......................................................................................................52 
ODBC Unificado..............................................................................................................................53 
LDAP ...............................................................................................................................................53 
Otras opciones de configuración................................................................................................................53 
–with-mcrypt=DIR ..........................................................................................................................53 
–enable-sysvsem ..............................................................................................................................53 
–enable-sysvshm ..............................................................................................................................53 
–with-xml .........................................................................................................................................53 
–enable-maintainer-mode.................................................................................................................54 
–with-system-regex ..........................................................................................................................54 
–with-config-file-path.......................................................................................................................54 
–with-exec-dir ..................................................................................................................................54 
–enable-debug ..................................................................................................................................54 
–enable-safe-mode ...........................................................................................................................54 
–enable-track-vars ............................................................................................................................55 
–enable-magic-quotes ......................................................................................................................55 
–enable-debugger .............................................................................................................................55 
–enable-discard-path ........................................................................................................................55 
–enable-bcmath ................................................................................................................................55 
–enable-force-cgi-redirect ................................................................................................................55 
–disable-short-tags ...........................................................................................................................56 
–enable-url-includes.........................................................................................................................56 
–disable-syntax-hl ............................................................................................................................56 
5
CPPFLAGS y LDFLAGS ................................................................................................................56 
Construyendo.............................................................................................................................................56 
Probando....................................................................................................................................................56 
Comprobando la velocidad ........................................................................................................................56 
Instalación en sistemas Windows 95/98/NT .......................................................................................................57 
Pasos Generales de Instalación ..................................................................................................................57 
Windows 95/98/NT y PWS/IIS 3 ..............................................................................................................57 
Windows NT e IIS 4 ..................................................................................................................................58 
Windows 9x/NT y Apache 1.3.x................................................................................................................59 
Omni HTTPd 2.0b1 para Windows ...........................................................................................................59 
Módulos del PHP.......................................................................................................................................59 
¿Problemas? ........................................................................................................................................................60 
Lea las PMF (FAQ)....................................................................................................................................60 
Informes de error .......................................................................................................................................60 
Otros problemas.........................................................................................................................................60 
3. Configuración............................................................................................................................................................61 
El archivo de configuración.................................................................................................................................63 
Directivas Generales de Configuración .....................................................................................................63 
Directivas de Configuración de Correo......................................................................................................66 
Directivas de Configuración de Modo Seguro...........................................................................................66 
Directivas de Configuración del Debugger................................................................................................67 
Directivas de Carga de Extensiones...........................................................................................................67 
Directivas de Configuración de MySQL....................................................................................................67 
Directivas de Configuración de mSQL......................................................................................................67 
Directivas de Configuración de Postgres ...................................................................................................68 
SESAM Configuration Directives .............................................................................................................68 
Directivas de Configuración de Sybase .....................................................................................................68 
Directivas de Configuración de Sybase-CT...............................................................................................69 
Directivas de Configuración de Informix ..................................................................................................69 
Directivas de Configuración de Matemática BC .......................................................................................70 
Directivas de Configuración de Capacidades de los Navegadores ............................................................70 
Directivas Unificadas de Configuración de ODBC ...................................................................................70 
4. Seguridad ..................................................................................................................................................................73 
Binarios CGI .......................................................................................................................................................75 
Posibles ataques .........................................................................................................................................75 
Caso 1: solamente se sirven ficheros publicos...........................................................................................75 
Caso 2: usando –enable-force-cgi-redirect ................................................................................................76 
Caso 3: Usando doc_root or user_dir ........................................................................................................76 
Caso 4: Analizador PHP fuera del arbol web. ...........................................................................................76 
Modulo Apache ...................................................................................................................................................77 
II. Referencia del Lenguaje..................................................................................................................................................79 
5. Sintaxis básica...........................................................................................................................................................79 
Saliendo de HTML..............................................................................................................................................81 
Separación de instrucciones ................................................................................................................................81 
Comentarios ........................................................................................................................................................81 
6. Types .........................................................................................................................................................................83 
Enteros.................................................................................................................................................................85 
Números en punto flotante ..................................................................................................................................85 
Cadenas ...............................................................................................................................................................85 
Conversión de cadenas...............................................................................................................................87 
Arrays ..................................................................................................................................................................87 
Arrays unidimensionales ...........................................................................................................................87 
Arrays Multidimensionales........................................................................................................................88 
Objetos ................................................................................................................................................................89 
Inicialización de Objetos ...........................................................................................................................89 
6
Type juggling.......................................................................................................................................................90 
Forzado de tipos.........................................................................................................................................90 
7. Variables....................................................................................................................................................................93 
Conceptos Básicos...............................................................................................................................................95 
Variables predefinidas .........................................................................................................................................95 
Variables de Apache ..................................................................................................................................96 
Variables de entorno ..................................................................................................................................97 
Variables de PHP .......................................................................................................................................97 
Ambito de las variables .......................................................................................................................................98 
Variables variables.............................................................................................................................................100 
Variables externas a PHP...................................................................................................................................100 
Formularios HTML (GET y POST) ........................................................................................................100 
IMAGE SUBMIT variable names..................................................................................................101 
Cookies HTTP .........................................................................................................................................101 
Variables de entorno ................................................................................................................................102 
Puntos en los nombres de variables de entrada........................................................................................102 
Determinando los tipos de variables........................................................................................................102 
8. Constantes ...............................................................................................................................................................103 
9. Expresiones .............................................................................................................................................................107 
10. Operadores ............................................................................................................................................................111 
Operadores Aritméticos.....................................................................................................................................113 
Operadores de Asignación ................................................................................................................................113 
Operadores Bit a bit...........................................................................................................................................113 
Operadores de Comparación .............................................................................................................................114 
Operador de ejecución.......................................................................................................................................114 
Operadores de Incremento/decremento.............................................................................................................115 
Operadores Lógicos...........................................................................................................................................115 
Precedencia de Operadores ...............................................................................................................................115 
Operadores de Cadenas .....................................................................................................................................116 
11. Estructuras de Control...........................................................................................................................................117 
if.......................................................................................................................................................................119 
else ..................................................................................................................................................................119 
elseif..............................................................................................................................................................119 
Sintaxis Alternativa de Estructuras de Control .................................................................................................120 
while ................................................................................................................................................................120 
do..while .......................................................................................................................................................121 
for ....................................................................................................................................................................122 
foreach............................................................................................................................................................123 
break ................................................................................................................................................................124 
continue..........................................................................................................................................................125 
switch..............................................................................................................................................................125 
require()............................................................................................................................................................127 
include()............................................................................................................................................................128 
require_once()..................................................................................................................................................131 
include_once() ..................................................................................................................................................133 
12. Funciones ..............................................................................................................................................................135 
Funciones definidas por el usuario ....................................................................................................................137 
Parámetros de las funciones ..............................................................................................................................137 
Pasar parámetros por referencia...............................................................................................................137 
Parámetros por defecto ............................................................................................................................138 
Lista de longitud variable de parámetros.................................................................................................139 
Devolver valores................................................................................................................................................139 
old_function.................................................................................................................................................139 
Funciones variable.............................................................................................................................................139 
13. Clases y Objetos....................................................................................................................................................141 
class ................................................................................................................................................................143 
7
14. References Explained............................................................................................................................................145 
What are References..........................................................................................................................................147 
What do References ..........................................................................................................................................147 
What aren’t References .....................................................................................................................................147 
Returning References ........................................................................................................................................147 
Unsetting References.........................................................................................................................................148 
Spotting the Reference ......................................................................................................................................148 
global References..................................................................................................................................148 
$this.......................................................................................................................................................148 
III. Características..............................................................................................................................................................149 
15. Manejando errores ................................................................................................................................................149 
16. Creando imágenes GIF .........................................................................................................................................153 
17. Autentificación HTTP con PHP............................................................................................................................157 
18. Cookies .................................................................................................................................................................161 
19. El envío de archivos ..............................................................................................................................................165 
Envío de archivos con el método POST............................................................................................................167 
Errores comunes................................................................................................................................................167 
Envío de más de un archivo...............................................................................................................................167 
Soporte del método PUT...................................................................................................................................168 
20. Usando archivos remotos ......................................................................................................................................171 
21. Manejando conexiones..........................................................................................................................................175 
22. Conexiones persistentes a bases de datos .............................................................................................................179 
IV. Referencia de las Funciones ........................................................................................................................................183 
I. Funciones específicas de Apache ............................................................................................................................183 
apache_lookup_uri ............................................................................................................................................185 
apache_note.......................................................................................................................................................185 
getallheaders......................................................................................................................................................185 
virtual ................................................................................................................................................................186 
II. Funciones de matrices ............................................................................................................................................187 
array...................................................................................................................................................................189 
array_count_values............................................................................................................................................189 
array_flip ...........................................................................................................................................................189 
array_keys .........................................................................................................................................................190 
array_merge.......................................................................................................................................................190 
array_pad...........................................................................................................................................................191 
array_pop...........................................................................................................................................................191 
array_push .........................................................................................................................................................192 
array_reverse .....................................................................................................................................................192 
array_shift..........................................................................................................................................................193 
array_slice .........................................................................................................................................................193 
array_splice .......................................................................................................................................................194 
array_unshift......................................................................................................................................................195 
array_values.......................................................................................................................................................195 
array_walk .........................................................................................................................................................196 
arsort..................................................................................................................................................................196 
asort ...................................................................................................................................................................197 
compact .............................................................................................................................................................197 
count ..................................................................................................................................................................198 
current................................................................................................................................................................198 
each....................................................................................................................................................................199 
end .....................................................................................................................................................................200 
extract ................................................................................................................................................................200 
in_array..............................................................................................................................................................201 
key .....................................................................................................................................................................201 
krsort..................................................................................................................................................................202 
8
ksort ...................................................................................................................................................................202 
list ......................................................................................................................................................................202 
next ....................................................................................................................................................................203 
pos .....................................................................................................................................................................203 
prev....................................................................................................................................................................204 
rango..................................................................................................................................................................204 
reset ...................................................................................................................................................................204 
rsort....................................................................................................................................................................204 
shuffle ................................................................................................................................................................205 
sizeof .................................................................................................................................................................205 
sort .....................................................................................................................................................................205 
uasort .................................................................................................................................................................206 
uksort.................................................................................................................................................................206 
usort ...................................................................................................................................................................207 
III. Funciones Ortográficas .........................................................................................................................................209 
aspell_new.........................................................................................................................................................211 
aspell_check ......................................................................................................................................................211 
aspell_check-raw...............................................................................................................................................211 
aspell_suggest....................................................................................................................................................212 
IV. Funciones matemáticas de precisión arbitraria.....................................................................................................213 
bcadd .................................................................................................................................................................215 
bccomp ..............................................................................................................................................................215 
bcdiv ..................................................................................................................................................................215 
bcmod................................................................................................................................................................215 
bcmul.................................................................................................................................................................215 
bcpow ................................................................................................................................................................216 
bcscale ...............................................................................................................................................................216 
bcsqrt .................................................................................................................................................................216 
bcsub..................................................................................................................................................................216 
V. Bzip2 Compression Functions ...............................................................................................................................217 
bzclose...............................................................................................................................................................219 
bzcompress ........................................................................................................................................................219 
bzdecompress ....................................................................................................................................................219 
bzerrno...............................................................................................................................................................220 
bzerror ...............................................................................................................................................................220 
bzerrstr...............................................................................................................................................................220 
bzflush ...............................................................................................................................................................221 
bzopen ...............................................................................................................................................................221 
bzread ................................................................................................................................................................221 
bzwrite...............................................................................................................................................................222 
VI. Funciones de calendario .......................................................................................................................................223 
JDToGregorian ..................................................................................................................................................225 
GregorianToJD ..................................................................................................................................................225 
JDToJulian.........................................................................................................................................................225 
JulianToJD.........................................................................................................................................................225 
JDToJewish........................................................................................................................................................226 
JewishToJD........................................................................................................................................................226 
JDToFrench .......................................................................................................................................................226 
FrenchToJD .......................................................................................................................................................226 
JDMonthName ..................................................................................................................................................226 
JDDayOfWeek...................................................................................................................................................227 
easter_date .........................................................................................................................................................227 
easter_days ........................................................................................................................................................228 
VII. CCVS API Functions ..........................................................................................................................................229 
231 
VIII. soporte de las funciones COM para Windows...................................................................................................233 
9
com_load ...........................................................................................................................................................235 
com_invoke .......................................................................................................................................................235 
com_propget......................................................................................................................................................235 
com_get .............................................................................................................................................................235 
com_propput......................................................................................................................................................235 
com_propset ......................................................................................................................................................235 
com_set..............................................................................................................................................................235 
IX. Funciones de Clases/Objectos ..............................................................................................................................237 
get_class_methods.............................................................................................................................................239 
get_class_vars....................................................................................................................................................239 
get_object_vars..................................................................................................................................................239 
method_exists....................................................................................................................................................239 
X. Funciones de ClibPDF ...........................................................................................................................................241 
cpdf_global_set_document_limits ....................................................................................................................245 
cpdf_set_creator ................................................................................................................................................245 
cpdf_set_title .....................................................................................................................................................245 
cpdf_set_subject ................................................................................................................................................245 
cpdf_set_keywords ............................................................................................................................................245 
cpdf_open ..........................................................................................................................................................246 
cpdf_close..........................................................................................................................................................246 
cpdf_page_init...................................................................................................................................................246 
cpdf_finalize_page ............................................................................................................................................246 
cpdf_finalize ......................................................................................................................................................247 
cpdf_output_buffer ............................................................................................................................................247 
cpdf_save_to_file...............................................................................................................................................247 
cpdf_set_current_page ......................................................................................................................................247 
cpdf_begin_text .................................................................................................................................................248 
cpdf_end_text ....................................................................................................................................................248 
cpdf_show .........................................................................................................................................................248 
cpdf_show_xy ...................................................................................................................................................248 
cpdf_text............................................................................................................................................................249 
cpdf_set_font.....................................................................................................................................................249 
cpdf_set_leading................................................................................................................................................249 
cpdf_set_text_rendering ....................................................................................................................................250 
cpdf_set_horiz_scaling......................................................................................................................................250 
cpdf_set_text_rise..............................................................................................................................................250 
cpdf_set_text_matrix .........................................................................................................................................250 
cpdf_set_text_pos..............................................................................................................................................250 
cpdf_set_char_spacing ......................................................................................................................................251 
cpdf_set_word_spacing .....................................................................................................................................251 
cpdf_continue_text ............................................................................................................................................251 
cpdf_stringwidth................................................................................................................................................251 
cpdf_save...........................................................................................................................................................251 
cpdf_restore.......................................................................................................................................................252 
cpdf_translate ....................................................................................................................................................252 
cpdf_scale..........................................................................................................................................................252 
cpdf_rotate.........................................................................................................................................................252 
cpdf_setflat ........................................................................................................................................................253 
cpdf_setlinejoin .................................................................................................................................................253 
cpdf_setlinecap..................................................................................................................................................253 
cpdf_setmiterlimit .............................................................................................................................................253 
cpdf_setlinewidth ..............................................................................................................................................253 
cpdf_setdash ......................................................................................................................................................254 
cpdf_moveto ......................................................................................................................................................254 
cpdf_rmoveto.....................................................................................................................................................254 
cpdf_curveto......................................................................................................................................................254 
10
cpdf_lineto.........................................................................................................................................................255 
cpdf_rlineto .......................................................................................................................................................255 
cpdf_circle .........................................................................................................................................................255 
cpdf_arc.............................................................................................................................................................255 
cpdf_rect............................................................................................................................................................256 
cpdf_closepath...................................................................................................................................................256 
cpdf_stroke ........................................................................................................................................................256 
cpdf_closepath_stroke .......................................................................................................................................256 
cpdf_fill .............................................................................................................................................................256 
cpdf_fill_stroke..................................................................................................................................................257 
cpdf_closepath_fill_stroke.................................................................................................................................257 
cpdf_clip............................................................................................................................................................257 
cpdf_setgray_fill................................................................................................................................................257 
cpdf_setgray_stroke...........................................................................................................................................258 
cpdf_setgray ......................................................................................................................................................258 
cpdf_setrgbcolor_fill .........................................................................................................................................258 
cpdf_setrgbcolor_stroke ....................................................................................................................................258 
cpdf_setrgbcolor................................................................................................................................................258 
cpdf_add_outline...............................................................................................................................................259 
cpdf_set_page_animation..................................................................................................................................259 
cpdf_import_jpeg ..............................................................................................................................................260 
cpdf_place_inline_image ..................................................................................................................................260 
cpdf_add_annotation .........................................................................................................................................260 
XI. CURL, Client URL Library Functions .................................................................................................................261 
curl_init .............................................................................................................................................................263 
curl_setopt .........................................................................................................................................................263 
curl_exec ...........................................................................................................................................................265 
curl_close ..........................................................................................................................................................265 
curl_version .......................................................................................................................................................265 
XII. Funciones de pago electrónico ............................................................................................................................267 
cybercash_encr ..................................................................................................................................................269 
cybercash_decr ..................................................................................................................................................269 
cybercash_base64_encode.................................................................................................................................269 
cybercash_base64_decode.................................................................................................................................269 
XIII. Character type functions ....................................................................................................................................271 
ctype_alnum ......................................................................................................................................................273 
ctype_alpha........................................................................................................................................................273 
ctype_cntrl.........................................................................................................................................................273 
ctype_digit.........................................................................................................................................................273 
ctype_lower .......................................................................................................................................................273 
ctype_graph .......................................................................................................................................................273 
ctype_print.........................................................................................................................................................273 
ctype_punct .......................................................................................................................................................274 
ctype_space .......................................................................................................................................................274 
ctype_upper .......................................................................................................................................................274 
ctype_xdigit.......................................................................................................................................................274 
XIV. Funciones de la capa de abstraccion de bases de datos (dbm-style)..................................................................275 
dba_close...........................................................................................................................................................277 
dba_delete..........................................................................................................................................................277 
dba_exists ..........................................................................................................................................................277 
dba_fetch ...........................................................................................................................................................277 
dba_firstkey .......................................................................................................................................................278 
dba_insert ..........................................................................................................................................................278 
dba_nextkey.......................................................................................................................................................278 
dba_popen .........................................................................................................................................................278 
dba_open ...........................................................................................................................................................279 
11
dba_optimize .....................................................................................................................................................279 
dba_replace........................................................................................................................................................279 
dba_sync............................................................................................................................................................280 
XV. Funciones de fecha y hora...................................................................................................................................281 
checkdate...........................................................................................................................................................283 
date ....................................................................................................................................................................283 
getdate ...............................................................................................................................................................284 
gettimeofday......................................................................................................................................................284 
gmdate ...............................................................................................................................................................285 
gmmktime..........................................................................................................................................................285 
gmstrftime .........................................................................................................................................................285 
microtime ..........................................................................................................................................................286 
mktime...............................................................................................................................................................286 
strftime ..............................................................................................................................................................287 
time....................................................................................................................................................................288 
XVI. Funciones para dBase ........................................................................................................................................289 
dbase_create ......................................................................................................................................................291 
dbase_open ........................................................................................................................................................291 
dbase_close........................................................................................................................................................292 
dbase_pack ........................................................................................................................................................292 
dbase_add_record..............................................................................................................................................292 
dbase_replace_record ........................................................................................................................................292 
dbase_delete_record ..........................................................................................................................................292 
dbase_get_record...............................................................................................................................................293 
dbase_get_record_with_names .........................................................................................................................293 
dbase_numfields ................................................................................................................................................293 
dbase_numrecords.............................................................................................................................................293 
XVII. Funciones dbm..................................................................................................................................................295 
dbmopen............................................................................................................................................................297 
dbmclose............................................................................................................................................................297 
dbmexists...........................................................................................................................................................297 
dbmfetch............................................................................................................................................................297 
dbminsert...........................................................................................................................................................297 
dbmreplace ........................................................................................................................................................298 
dbmdelete ..........................................................................................................................................................298 
dbmfirstkey........................................................................................................................................................298 
dbmnextkey .......................................................................................................................................................298 
dblist ..................................................................................................................................................................299 
XVIII. dbx functions...................................................................................................................................................301 
dbx_close...........................................................................................................................................................303 
dbx_connect ......................................................................................................................................................303 
dbx_error ...........................................................................................................................................................304 
dbx_query..........................................................................................................................................................304 
dbx_sort.............................................................................................................................................................306 
dbx_cmp_asc.....................................................................................................................................................306 
dbx_cmp_desc...................................................................................................................................................307 
XIX. Funciones con directorios ..................................................................................................................................309 
chdir...................................................................................................................................................................311 
dir ......................................................................................................................................................................311 
closedir ..............................................................................................................................................................311 
opendir...............................................................................................................................................................311 
readdir................................................................................................................................................................311 
rewinddir ...........................................................................................................................................................312 
XX. Funciones de DOM XML ...................................................................................................................................313 
xmldoc...............................................................................................................................................................315 
xmldocfile..........................................................................................................................................................315 
12
xmltree...............................................................................................................................................................315 
XXI. Error Handling and Logging Functions .............................................................................................................317 
error_log ............................................................................................................................................................319 
error_reporting ..................................................................................................................................................320 
restore_error_handler ........................................................................................................................................320 
set_error_handler...............................................................................................................................................320 
trigger_error ......................................................................................................................................................322 
user_error ..........................................................................................................................................................323 
XXII. Funciones filePro ..............................................................................................................................................325 
filepro ................................................................................................................................................................327 
filepro_fieldname...............................................................................................................................................327 
filepro_fieldtype ................................................................................................................................................327 
filepro_fieldwidth ..............................................................................................................................................327 
filepro_retrieve ..................................................................................................................................................327 
filepro_fieldcount ..............................................................................................................................................327 
filepro_rowcount ...............................................................................................................................................328 
XXIII. Funciones del sistema de ficheros ...................................................................................................................329 
basename ...........................................................................................................................................................331 
chgrp..................................................................................................................................................................331 
chmod................................................................................................................................................................331 
chown ................................................................................................................................................................332 
clearstatcache ....................................................................................................................................................332 
copy ...................................................................................................................................................................332 
delete .................................................................................................................................................................333 
dirname..............................................................................................................................................................333 
diskfreespace .....................................................................................................................................................333 
fclose .................................................................................................................................................................333 
feof ....................................................................................................................................................................334 
fgetc ...................................................................................................................................................................334 
fgetcsv ...............................................................................................................................................................334 
fgets ...................................................................................................................................................................335 
fgetss..................................................................................................................................................................335 
file......................................................................................................................................................................336 
file_exists...........................................................................................................................................................336 
fileatime.............................................................................................................................................................336 
filectime.............................................................................................................................................................336 
filegroup.............................................................................................................................................................337 
fileinode.............................................................................................................................................................337 
filemtime............................................................................................................................................................337 
fileowner............................................................................................................................................................337 
fileperms ............................................................................................................................................................337 
filesize................................................................................................................................................................338 
filetype...............................................................................................................................................................338 
flock...................................................................................................................................................................338 
fopen..................................................................................................................................................................339 
fpassthru ............................................................................................................................................................340 
fputs ...................................................................................................................................................................340 
fread...................................................................................................................................................................340 
fseek ..................................................................................................................................................................340 
ftell ....................................................................................................................................................................341 
fwrite .................................................................................................................................................................341 
set_file_buffer....................................................................................................................................................341 
is_dir..................................................................................................................................................................342 
is_executable .....................................................................................................................................................342 
is_file .................................................................................................................................................................342 
is_link ................................................................................................................................................................342 
13
is_readable.........................................................................................................................................................343 
is_writeable .......................................................................................................................................................343 
link.....................................................................................................................................................................343 
linkinfo ..............................................................................................................................................................343 
mkdir .................................................................................................................................................................344 
pclose.................................................................................................................................................................344 
popen .................................................................................................................................................................344 
readfile...............................................................................................................................................................345 
readlink..............................................................................................................................................................345 
rename ...............................................................................................................................................................345 
rewind................................................................................................................................................................345 
rmdir ..................................................................................................................................................................346 
stat .....................................................................................................................................................................346 
lstat ....................................................................................................................................................................347 
symlink ..............................................................................................................................................................347 
tempnam............................................................................................................................................................347 
touch ..................................................................................................................................................................348 
umask ................................................................................................................................................................348 
unlink.................................................................................................................................................................348 
XXIV. Funciones Forms Data Format (Formato de Datos de Formularios) ..............................................................351 
fdf_open ............................................................................................................................................................353 
fdf_close ............................................................................................................................................................353 
fdf_create...........................................................................................................................................................353 
fdf_save .............................................................................................................................................................354 
fdf_get_value.....................................................................................................................................................354 
fdf_set_value .....................................................................................................................................................354 
fdf_next_field_name..........................................................................................................................................354 
fdf_set_ap ..........................................................................................................................................................355 
fdf_set_status.....................................................................................................................................................355 
fdf_get_status ....................................................................................................................................................355 
fdf_set_file.........................................................................................................................................................355 
fdf_get_file ........................................................................................................................................................356 
XXV. Funciones FTP..................................................................................................................................................357 
ftp_connect ........................................................................................................................................................359 
ftp_login ............................................................................................................................................................359 
ftp_pwd..............................................................................................................................................................359 
ftp_cdup.............................................................................................................................................................359 
ftp_chdir ............................................................................................................................................................359 
ftp_mkdir...........................................................................................................................................................359 
ftp_rmdir............................................................................................................................................................360 
ftp_nlist..............................................................................................................................................................360 
ftp_rawlist..........................................................................................................................................................360 
ftp_systype ........................................................................................................................................................360 
ftp_pasv .............................................................................................................................................................360 
ftp_get................................................................................................................................................................361 
ftp_fget ..............................................................................................................................................................361 
ftp_put ...............................................................................................................................................................361 
ftp_fput ..............................................................................................................................................................361 
ftp_size ..............................................................................................................................................................362 
ftp_mdtm ...........................................................................................................................................................362 
ftp_rename.........................................................................................................................................................362 
ftp_delete ...........................................................................................................................................................362 
ftp_quit ..............................................................................................................................................................362 
XXVI. Function Handling functions...........................................................................................................................365 
call_user_func ...................................................................................................................................................367 
create_function ..................................................................................................................................................367 
14
func_get_arg......................................................................................................................................................369 
func_get_args ....................................................................................................................................................369 
func_num_args ..................................................................................................................................................370 
function_exists...................................................................................................................................................370 
register_shutdown_function ..............................................................................................................................371 
XXVII. GNU Gettext..................................................................................................................................................373 
bindtextdomain..................................................................................................................................................375 
dcgettext ............................................................................................................................................................375 
dgettext ..............................................................................................................................................................375 
gettext ................................................................................................................................................................375 
textdomain.........................................................................................................................................................375 
XXVIII. GMP functions .............................................................................................................................................377 
gmp_init ............................................................................................................................................................379 
gmp_intval.........................................................................................................................................................379 
gmp_strval .........................................................................................................................................................379 
gmp_add............................................................................................................................................................380 
gmp_sub ............................................................................................................................................................380 
gmp_mul............................................................................................................................................................380 
gmp_div_q.........................................................................................................................................................380 
gmp_div_r .........................................................................................................................................................380 
gmp_div_qr .......................................................................................................................................................381 
gmp_div.............................................................................................................................................................381 
gmp_mod...........................................................................................................................................................381 
gmp_divexact ....................................................................................................................................................382 
gmp_cmp...........................................................................................................................................................382 
gmp_neg ............................................................................................................................................................382 
gmp_abs ............................................................................................................................................................382 
gmp_sign ...........................................................................................................................................................382 
gmp_fact............................................................................................................................................................382 
gmp_sqrt............................................................................................................................................................383 
gmp_sqrtrm .......................................................................................................................................................383 
gmp_perfect_square ..........................................................................................................................................383 
gmp_pow...........................................................................................................................................................383 
gmp_powm........................................................................................................................................................383 
gmp_prob_prime ...............................................................................................................................................384 
gmp_gcd............................................................................................................................................................384 
gmp_gcdext .......................................................................................................................................................384 
gmp_invert.........................................................................................................................................................384 
gmp_legendre ....................................................................................................................................................384 
gmp_jacobi ........................................................................................................................................................385 
gmp_random......................................................................................................................................................385 
gmp_and............................................................................................................................................................385 
gmp_or ..............................................................................................................................................................385 
gmp_xor ............................................................................................................................................................385 
gmp_setbit .........................................................................................................................................................386 
gmp_clrbit .........................................................................................................................................................386 
gmp_scan0.........................................................................................................................................................386 
gmp_scan1.........................................................................................................................................................386 
gmp_popcount...................................................................................................................................................386 
gmp_hamdist .....................................................................................................................................................387 
XXIX. Funciones HTTP.............................................................................................................................................389 
header ................................................................................................................................................................391 
setcookie............................................................................................................................................................391 
XXX. Funciones para Hyperwave ..............................................................................................................................393 
hw_Array2Objrec..............................................................................................................................................397 
hw_Children ......................................................................................................................................................397 
15
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php
Php

Más contenido relacionado

Destacado

Agribusiness management a stepping stone towards a better - Vishnu Pujari & N...
Agribusiness management a stepping stone towards a better - Vishnu Pujari & N...Agribusiness management a stepping stone towards a better - Vishnu Pujari & N...
Agribusiness management a stepping stone towards a better - Vishnu Pujari & N...Vishnu Pujari
 
η βιβλιοθήκη μας λειτουργεί και σας περιμένει κάθε παρασκευή
η βιβλιοθήκη μας λειτουργεί και σας περιμένει κάθε παρασκευήη βιβλιοθήκη μας λειτουργεί και σας περιμένει κάθε παρασκευή
η βιβλιοθήκη μας λειτουργεί και σας περιμένει κάθε παρασκευήΓιάννης Καραλάκος
 
Robert Peters' TASA Presentation 2013-06-24
Robert Peters' TASA Presentation 2013-06-24Robert Peters' TASA Presentation 2013-06-24
Robert Peters' TASA Presentation 2013-06-24Robert Peters, Ed.D
 
Κωνσταντίνος Καβάφης
Κωνσταντίνος  Καβάφης  Κωνσταντίνος  Καβάφης
Κωνσταντίνος Καβάφης nicolaidoumarina
 
Santa maria maggiore (pianella)
Santa maria maggiore (pianella)Santa maria maggiore (pianella)
Santa maria maggiore (pianella)MarconiBGG
 
Of mice and men background & themes ppt
Of mice and men background & themes pptOf mice and men background & themes ppt
Of mice and men background & themes pptL Lambe
 
MultiShop: una delle migliori estensioni TYPO3 per l'eCommerce
MultiShop: una delle migliori estensioni TYPO3 per l'eCommerceMultiShop: una delle migliori estensioni TYPO3 per l'eCommerce
MultiShop: una delle migliori estensioni TYPO3 per l'eCommerceRino Razzi
 
Quem da prenda ao pai natal
Quem da prenda ao pai natalQuem da prenda ao pai natal
Quem da prenda ao pai natalAna Moreira
 
Questionnaire Results Analysis
Questionnaire Results AnalysisQuestionnaire Results Analysis
Questionnaire Results Analysisemilyxfox
 
女性と子供が輝くBopビジネス 2014年10月11日 北海学園大学ホームカミングデー
女性と子供が輝くBopビジネス 2014年10月11日 北海学園大学ホームカミングデー女性と子供が輝くBopビジネス 2014年10月11日 北海学園大学ホームカミングデー
女性と子供が輝くBopビジネス 2014年10月11日 北海学園大学ホームカミングデーHideyuki Sugawara
 
Do Binaural Beats Induce Lucid Dreaming?
Do Binaural Beats Induce Lucid Dreaming?Do Binaural Beats Induce Lucid Dreaming?
Do Binaural Beats Induce Lucid Dreaming?belligerentmani18
 
Desayuno solidario a favor del Proyecto de cooperación educativa en Ghana
Desayuno solidario a favor del Proyecto de cooperación educativa en GhanaDesayuno solidario a favor del Proyecto de cooperación educativa en Ghana
Desayuno solidario a favor del Proyecto de cooperación educativa en Ghanaadepuongd
 
Second year project activities 2013 2014
Second year project activities 2013 2014Second year project activities 2013 2014
Second year project activities 2013 2014guter5
 
A Cidade Constitucional: Relatório de André Vinícius R. de Mota
A Cidade Constitucional: Relatório de André Vinícius R. de MotaA Cidade Constitucional: Relatório de André Vinícius R. de Mota
A Cidade Constitucional: Relatório de André Vinícius R. de MotaAna Carolina
 
Reconstruction in america
Reconstruction in americaReconstruction in america
Reconstruction in americadwessler
 

Destacado (20)

Agribusiness management a stepping stone towards a better - Vishnu Pujari & N...
Agribusiness management a stepping stone towards a better - Vishnu Pujari & N...Agribusiness management a stepping stone towards a better - Vishnu Pujari & N...
Agribusiness management a stepping stone towards a better - Vishnu Pujari & N...
 
η βιβλιοθήκη μας λειτουργεί και σας περιμένει κάθε παρασκευή
η βιβλιοθήκη μας λειτουργεί και σας περιμένει κάθε παρασκευήη βιβλιοθήκη μας λειτουργεί και σας περιμένει κάθε παρασκευή
η βιβλιοθήκη μας λειτουργεί και σας περιμένει κάθε παρασκευή
 
Robert Peters' TASA Presentation 2013-06-24
Robert Peters' TASA Presentation 2013-06-24Robert Peters' TASA Presentation 2013-06-24
Robert Peters' TASA Presentation 2013-06-24
 
Κωνσταντίνος Καβάφης
Κωνσταντίνος  Καβάφης  Κωνσταντίνος  Καβάφης
Κωνσταντίνος Καβάφης
 
Santa maria maggiore (pianella)
Santa maria maggiore (pianella)Santa maria maggiore (pianella)
Santa maria maggiore (pianella)
 
A França
A FrançaA França
A França
 
caitlin and amanda
caitlin and amandacaitlin and amanda
caitlin and amanda
 
Of mice and men background & themes ppt
Of mice and men background & themes pptOf mice and men background & themes ppt
Of mice and men background & themes ppt
 
Workbook sesion14
Workbook sesion14Workbook sesion14
Workbook sesion14
 
MultiShop: una delle migliori estensioni TYPO3 per l'eCommerce
MultiShop: una delle migliori estensioni TYPO3 per l'eCommerceMultiShop: una delle migliori estensioni TYPO3 per l'eCommerce
MultiShop: una delle migliori estensioni TYPO3 per l'eCommerce
 
Quem da prenda ao pai natal
Quem da prenda ao pai natalQuem da prenda ao pai natal
Quem da prenda ao pai natal
 
wajdi
wajdiwajdi
wajdi
 
Questionnaire Results Analysis
Questionnaire Results AnalysisQuestionnaire Results Analysis
Questionnaire Results Analysis
 
女性と子供が輝くBopビジネス 2014年10月11日 北海学園大学ホームカミングデー
女性と子供が輝くBopビジネス 2014年10月11日 北海学園大学ホームカミングデー女性と子供が輝くBopビジネス 2014年10月11日 北海学園大学ホームカミングデー
女性と子供が輝くBopビジネス 2014年10月11日 北海学園大学ホームカミングデー
 
Do Binaural Beats Induce Lucid Dreaming?
Do Binaural Beats Induce Lucid Dreaming?Do Binaural Beats Induce Lucid Dreaming?
Do Binaural Beats Induce Lucid Dreaming?
 
Desayuno solidario a favor del Proyecto de cooperación educativa en Ghana
Desayuno solidario a favor del Proyecto de cooperación educativa en GhanaDesayuno solidario a favor del Proyecto de cooperación educativa en Ghana
Desayuno solidario a favor del Proyecto de cooperación educativa en Ghana
 
Second year project activities 2013 2014
Second year project activities 2013 2014Second year project activities 2013 2014
Second year project activities 2013 2014
 
PRESENTACIÓN 3
PRESENTACIÓN 3PRESENTACIÓN 3
PRESENTACIÓN 3
 
A Cidade Constitucional: Relatório de André Vinícius R. de Mota
A Cidade Constitucional: Relatório de André Vinícius R. de MotaA Cidade Constitucional: Relatório de André Vinícius R. de Mota
A Cidade Constitucional: Relatório de André Vinícius R. de Mota
 
Reconstruction in america
Reconstruction in americaReconstruction in america
Reconstruction in america
 

Similar a Php (20)

Manual completo de php
Manual completo de phpManual completo de php
Manual completo de php
 
Manual de PHP
Manual de PHPManual de PHP
Manual de PHP
 
La biblia de_php
La biblia de_phpLa biblia de_php
La biblia de_php
 
Php, manual completo
Php, manual completoPhp, manual completo
Php, manual completo
 
Php manual completo español
Php manual completo españolPhp manual completo español
Php manual completo español
 
Php manual
Php manualPhp manual
Php manual
 
Manual de php
Manual de phpManual de php
Manual de php
 
Manual de php
Manual de phpManual de php
Manual de php
 
Manual php
Manual phpManual php
Manual php
 
Manual php
Manual phpManual php
Manual php
 
Manual de php
Manual de phpManual de php
Manual de php
 
Php manual completo
Php manual completoPhp manual completo
Php manual completo
 
Manual de php
Manual de phpManual de php
Manual de php
 
Flash8 p pasos
Flash8 p pasosFlash8 p pasos
Flash8 p pasos
 
Flash8 p pasos
Flash8 p pasosFlash8 p pasos
Flash8 p pasos
 
Primeros pasos con Flash
Primeros pasos con Flash Primeros pasos con Flash
Primeros pasos con Flash
 
Flash8_PPasos.pdf
Flash8_PPasos.pdfFlash8_PPasos.pdf
Flash8_PPasos.pdf
 
Administracion avanzada de_gnu-linux-uoc
Administracion avanzada de_gnu-linux-uocAdministracion avanzada de_gnu-linux-uoc
Administracion avanzada de_gnu-linux-uoc
 
Desarrollo de-software-basado-en-reutilizacion
Desarrollo de-software-basado-en-reutilizacionDesarrollo de-software-basado-en-reutilizacion
Desarrollo de-software-basado-en-reutilizacion
 
Taller php
Taller phpTaller php
Taller php
 

Último

9egb-lengua y Literatura.pdf_texto del estudiante
9egb-lengua y Literatura.pdf_texto del estudiante9egb-lengua y Literatura.pdf_texto del estudiante
9egb-lengua y Literatura.pdf_texto del estudianteAndreaHuertas24
 
Proyecto integrador. Las TIC en la sociedad S4.pptx
Proyecto integrador. Las TIC en la sociedad S4.pptxProyecto integrador. Las TIC en la sociedad S4.pptx
Proyecto integrador. Las TIC en la sociedad S4.pptx241521559
 
EPA-pdf resultado da prova presencial Uninove
EPA-pdf resultado da prova presencial UninoveEPA-pdf resultado da prova presencial Uninove
EPA-pdf resultado da prova presencial UninoveFagnerLisboa3
 
pruebas unitarias unitarias en java con JUNIT
pruebas unitarias unitarias en java con JUNITpruebas unitarias unitarias en java con JUNIT
pruebas unitarias unitarias en java con JUNITMaricarmen Sánchez Ruiz
 
Trabajo Mas Completo De Excel en clase tecnología
Trabajo Mas Completo De Excel en clase tecnologíaTrabajo Mas Completo De Excel en clase tecnología
Trabajo Mas Completo De Excel en clase tecnologíassuserf18419
 
trabajotecologiaisabella-240424003133-8f126965.pdf
trabajotecologiaisabella-240424003133-8f126965.pdftrabajotecologiaisabella-240424003133-8f126965.pdf
trabajotecologiaisabella-240424003133-8f126965.pdfIsabellaMontaomurill
 
POWER POINT YUCRAElabore una PRESENTACIÓN CORTA sobre el video película: La C...
POWER POINT YUCRAElabore una PRESENTACIÓN CORTA sobre el video película: La C...POWER POINT YUCRAElabore una PRESENTACIÓN CORTA sobre el video película: La C...
POWER POINT YUCRAElabore una PRESENTACIÓN CORTA sobre el video película: La C...silviayucra2
 
Global Azure Lima 2024 - Integración de Datos con Microsoft Fabric
Global Azure Lima 2024 - Integración de Datos con Microsoft FabricGlobal Azure Lima 2024 - Integración de Datos con Microsoft Fabric
Global Azure Lima 2024 - Integración de Datos con Microsoft FabricKeyla Dolores Méndez
 
KELA Presentacion Costa Rica 2024 - evento Protégeles
KELA Presentacion Costa Rica 2024 - evento ProtégelesKELA Presentacion Costa Rica 2024 - evento Protégeles
KELA Presentacion Costa Rica 2024 - evento ProtégelesFundación YOD YOD
 
International Women's Day Sucre 2024 (IWD)
International Women's Day Sucre 2024 (IWD)International Women's Day Sucre 2024 (IWD)
International Women's Day Sucre 2024 (IWD)GDGSucre
 
CLASE DE TECNOLOGIA E INFORMATICA PRIMARIA
CLASE  DE TECNOLOGIA E INFORMATICA PRIMARIACLASE  DE TECNOLOGIA E INFORMATICA PRIMARIA
CLASE DE TECNOLOGIA E INFORMATICA PRIMARIAWilbisVega
 
guía de registro de slideshare por Brayan Joseph
guía de registro de slideshare por Brayan Josephguía de registro de slideshare por Brayan Joseph
guía de registro de slideshare por Brayan JosephBRAYANJOSEPHPEREZGOM
 
Presentación guía sencilla en Microsoft Excel.pptx
Presentación guía sencilla en Microsoft Excel.pptxPresentación guía sencilla en Microsoft Excel.pptx
Presentación guía sencilla en Microsoft Excel.pptxLolaBunny11
 
Herramientas de corte de alta velocidad.pptx
Herramientas de corte de alta velocidad.pptxHerramientas de corte de alta velocidad.pptx
Herramientas de corte de alta velocidad.pptxRogerPrieto3
 
Redes direccionamiento y subredes ipv4 2024 .pdf
Redes direccionamiento y subredes ipv4 2024 .pdfRedes direccionamiento y subredes ipv4 2024 .pdf
Redes direccionamiento y subredes ipv4 2024 .pdfsoporteupcology
 

Último (15)

9egb-lengua y Literatura.pdf_texto del estudiante
9egb-lengua y Literatura.pdf_texto del estudiante9egb-lengua y Literatura.pdf_texto del estudiante
9egb-lengua y Literatura.pdf_texto del estudiante
 
Proyecto integrador. Las TIC en la sociedad S4.pptx
Proyecto integrador. Las TIC en la sociedad S4.pptxProyecto integrador. Las TIC en la sociedad S4.pptx
Proyecto integrador. Las TIC en la sociedad S4.pptx
 
EPA-pdf resultado da prova presencial Uninove
EPA-pdf resultado da prova presencial UninoveEPA-pdf resultado da prova presencial Uninove
EPA-pdf resultado da prova presencial Uninove
 
pruebas unitarias unitarias en java con JUNIT
pruebas unitarias unitarias en java con JUNITpruebas unitarias unitarias en java con JUNIT
pruebas unitarias unitarias en java con JUNIT
 
Trabajo Mas Completo De Excel en clase tecnología
Trabajo Mas Completo De Excel en clase tecnologíaTrabajo Mas Completo De Excel en clase tecnología
Trabajo Mas Completo De Excel en clase tecnología
 
trabajotecologiaisabella-240424003133-8f126965.pdf
trabajotecologiaisabella-240424003133-8f126965.pdftrabajotecologiaisabella-240424003133-8f126965.pdf
trabajotecologiaisabella-240424003133-8f126965.pdf
 
POWER POINT YUCRAElabore una PRESENTACIÓN CORTA sobre el video película: La C...
POWER POINT YUCRAElabore una PRESENTACIÓN CORTA sobre el video película: La C...POWER POINT YUCRAElabore una PRESENTACIÓN CORTA sobre el video película: La C...
POWER POINT YUCRAElabore una PRESENTACIÓN CORTA sobre el video película: La C...
 
Global Azure Lima 2024 - Integración de Datos con Microsoft Fabric
Global Azure Lima 2024 - Integración de Datos con Microsoft FabricGlobal Azure Lima 2024 - Integración de Datos con Microsoft Fabric
Global Azure Lima 2024 - Integración de Datos con Microsoft Fabric
 
KELA Presentacion Costa Rica 2024 - evento Protégeles
KELA Presentacion Costa Rica 2024 - evento ProtégelesKELA Presentacion Costa Rica 2024 - evento Protégeles
KELA Presentacion Costa Rica 2024 - evento Protégeles
 
International Women's Day Sucre 2024 (IWD)
International Women's Day Sucre 2024 (IWD)International Women's Day Sucre 2024 (IWD)
International Women's Day Sucre 2024 (IWD)
 
CLASE DE TECNOLOGIA E INFORMATICA PRIMARIA
CLASE  DE TECNOLOGIA E INFORMATICA PRIMARIACLASE  DE TECNOLOGIA E INFORMATICA PRIMARIA
CLASE DE TECNOLOGIA E INFORMATICA PRIMARIA
 
guía de registro de slideshare por Brayan Joseph
guía de registro de slideshare por Brayan Josephguía de registro de slideshare por Brayan Joseph
guía de registro de slideshare por Brayan Joseph
 
Presentación guía sencilla en Microsoft Excel.pptx
Presentación guía sencilla en Microsoft Excel.pptxPresentación guía sencilla en Microsoft Excel.pptx
Presentación guía sencilla en Microsoft Excel.pptx
 
Herramientas de corte de alta velocidad.pptx
Herramientas de corte de alta velocidad.pptxHerramientas de corte de alta velocidad.pptx
Herramientas de corte de alta velocidad.pptx
 
Redes direccionamiento y subredes ipv4 2024 .pdf
Redes direccionamiento y subredes ipv4 2024 .pdfRedes direccionamiento y subredes ipv4 2024 .pdf
Redes direccionamiento y subredes ipv4 2024 .pdf
 

Php

  • 1. Manual de PHP Stig Sæther Bakken Alexander Aulbach Egon Schmid Jim Winstead Lars Torben Wilson Rasmus Lerdorf Zeev Suraski Andrei Zmievski Jouni Ahto Editado por Rafael Martínez
  • 2.
  • 3. Manual de PHP por Stig Sæther Bakken, Alexander Aulbach, Egon Schmid, Jim Winstead, Lars Torben Wilson, Rasmus Lerdorf, Zeev Suraski, Andrei Zmievski, y Jouni Ahto Editado por Rafael Martínez Publicado 15-04-2001 Copyright © 1997, 1998, 1999, 2000, 2001 por por el Grupo de documentación de PHP Copyright Este manual es © Copyright 1997, 1998, 1999, 2000, 2001 del Grupo de documentación de PHP. Los miembros de este grupo se encuentran listados en la primera página de este manual. Este manual puede ser redistribuido bajo los términos de la "GNU General Public License"publicada por la "Free Software Foundation"; tanto bajo la versión 2 de esta licencia o bajo versiones posteriores.
  • 4.
  • 5. Tabla de contenidos Prefacio ..................................................................................................................................................................................41 Sobre este Manual.........................................................................................................................................................41 Sobre la traducción .......................................................................................................................................................41 I. Conceptos Básicos .............................................................................................................................................................43 1. Introducción ..............................................................................................................................................................43 Qué es PHP?........................................................................................................................................................45 Qué se puede hacer con PHP?.............................................................................................................................45 Corta historia de PHP..........................................................................................................................................45 2. Instalación .................................................................................................................................................................47 Bajándose la última versión ................................................................................................................................49 Instalación en sistemas UNIX.............................................................................................................................49 Instrucciones Rápidas de Instalación (Versión Módulo de Apache) .........................................................49 Configuración ............................................................................................................................................49 Módulo del Apache....................................................................................................................................50 Módulo fhttpd ............................................................................................................................................50 CGI version................................................................................................................................................50 Opciones de soporte para Base de Datos...................................................................................................50 Adabas D..........................................................................................................................................50 dBase................................................................................................................................................50 filePro ...............................................................................................................................................50 mSQL...............................................................................................................................................51 MySQL.............................................................................................................................................51 iODBC .............................................................................................................................................51 OpenLink ODBC .............................................................................................................................51 Oracle ...............................................................................................................................................51 PostgreSQL ......................................................................................................................................52 Solid .................................................................................................................................................52 Sybase ..............................................................................................................................................52 Sybase-CT........................................................................................................................................52 Velocis ..............................................................................................................................................52 Una librería a medida de ODBC......................................................................................................52 ODBC Unificado..............................................................................................................................53 LDAP ...............................................................................................................................................53 Otras opciones de configuración................................................................................................................53 –with-mcrypt=DIR ..........................................................................................................................53 –enable-sysvsem ..............................................................................................................................53 –enable-sysvshm ..............................................................................................................................53 –with-xml .........................................................................................................................................53 –enable-maintainer-mode.................................................................................................................54 –with-system-regex ..........................................................................................................................54 –with-config-file-path.......................................................................................................................54 –with-exec-dir ..................................................................................................................................54 –enable-debug ..................................................................................................................................54 –enable-safe-mode ...........................................................................................................................54 –enable-track-vars ............................................................................................................................55 –enable-magic-quotes ......................................................................................................................55 –enable-debugger .............................................................................................................................55 –enable-discard-path ........................................................................................................................55 –enable-bcmath ................................................................................................................................55 –enable-force-cgi-redirect ................................................................................................................55 –disable-short-tags ...........................................................................................................................56 –enable-url-includes.........................................................................................................................56 –disable-syntax-hl ............................................................................................................................56 5
  • 6. CPPFLAGS y LDFLAGS ................................................................................................................56 Construyendo.............................................................................................................................................56 Probando....................................................................................................................................................56 Comprobando la velocidad ........................................................................................................................56 Instalación en sistemas Windows 95/98/NT .......................................................................................................57 Pasos Generales de Instalación ..................................................................................................................57 Windows 95/98/NT y PWS/IIS 3 ..............................................................................................................57 Windows NT e IIS 4 ..................................................................................................................................58 Windows 9x/NT y Apache 1.3.x................................................................................................................59 Omni HTTPd 2.0b1 para Windows ...........................................................................................................59 Módulos del PHP.......................................................................................................................................59 ¿Problemas? ........................................................................................................................................................60 Lea las PMF (FAQ)....................................................................................................................................60 Informes de error .......................................................................................................................................60 Otros problemas.........................................................................................................................................60 3. Configuración............................................................................................................................................................61 El archivo de configuración.................................................................................................................................63 Directivas Generales de Configuración .....................................................................................................63 Directivas de Configuración de Correo......................................................................................................66 Directivas de Configuración de Modo Seguro...........................................................................................66 Directivas de Configuración del Debugger................................................................................................67 Directivas de Carga de Extensiones...........................................................................................................67 Directivas de Configuración de MySQL....................................................................................................67 Directivas de Configuración de mSQL......................................................................................................67 Directivas de Configuración de Postgres ...................................................................................................68 SESAM Configuration Directives .............................................................................................................68 Directivas de Configuración de Sybase .....................................................................................................68 Directivas de Configuración de Sybase-CT...............................................................................................69 Directivas de Configuración de Informix ..................................................................................................69 Directivas de Configuración de Matemática BC .......................................................................................70 Directivas de Configuración de Capacidades de los Navegadores ............................................................70 Directivas Unificadas de Configuración de ODBC ...................................................................................70 4. Seguridad ..................................................................................................................................................................73 Binarios CGI .......................................................................................................................................................75 Posibles ataques .........................................................................................................................................75 Caso 1: solamente se sirven ficheros publicos...........................................................................................75 Caso 2: usando –enable-force-cgi-redirect ................................................................................................76 Caso 3: Usando doc_root or user_dir ........................................................................................................76 Caso 4: Analizador PHP fuera del arbol web. ...........................................................................................76 Modulo Apache ...................................................................................................................................................77 II. Referencia del Lenguaje..................................................................................................................................................79 5. Sintaxis básica...........................................................................................................................................................79 Saliendo de HTML..............................................................................................................................................81 Separación de instrucciones ................................................................................................................................81 Comentarios ........................................................................................................................................................81 6. Types .........................................................................................................................................................................83 Enteros.................................................................................................................................................................85 Números en punto flotante ..................................................................................................................................85 Cadenas ...............................................................................................................................................................85 Conversión de cadenas...............................................................................................................................87 Arrays ..................................................................................................................................................................87 Arrays unidimensionales ...........................................................................................................................87 Arrays Multidimensionales........................................................................................................................88 Objetos ................................................................................................................................................................89 Inicialización de Objetos ...........................................................................................................................89 6
  • 7. Type juggling.......................................................................................................................................................90 Forzado de tipos.........................................................................................................................................90 7. Variables....................................................................................................................................................................93 Conceptos Básicos...............................................................................................................................................95 Variables predefinidas .........................................................................................................................................95 Variables de Apache ..................................................................................................................................96 Variables de entorno ..................................................................................................................................97 Variables de PHP .......................................................................................................................................97 Ambito de las variables .......................................................................................................................................98 Variables variables.............................................................................................................................................100 Variables externas a PHP...................................................................................................................................100 Formularios HTML (GET y POST) ........................................................................................................100 IMAGE SUBMIT variable names..................................................................................................101 Cookies HTTP .........................................................................................................................................101 Variables de entorno ................................................................................................................................102 Puntos en los nombres de variables de entrada........................................................................................102 Determinando los tipos de variables........................................................................................................102 8. Constantes ...............................................................................................................................................................103 9. Expresiones .............................................................................................................................................................107 10. Operadores ............................................................................................................................................................111 Operadores Aritméticos.....................................................................................................................................113 Operadores de Asignación ................................................................................................................................113 Operadores Bit a bit...........................................................................................................................................113 Operadores de Comparación .............................................................................................................................114 Operador de ejecución.......................................................................................................................................114 Operadores de Incremento/decremento.............................................................................................................115 Operadores Lógicos...........................................................................................................................................115 Precedencia de Operadores ...............................................................................................................................115 Operadores de Cadenas .....................................................................................................................................116 11. Estructuras de Control...........................................................................................................................................117 if.......................................................................................................................................................................119 else ..................................................................................................................................................................119 elseif..............................................................................................................................................................119 Sintaxis Alternativa de Estructuras de Control .................................................................................................120 while ................................................................................................................................................................120 do..while .......................................................................................................................................................121 for ....................................................................................................................................................................122 foreach............................................................................................................................................................123 break ................................................................................................................................................................124 continue..........................................................................................................................................................125 switch..............................................................................................................................................................125 require()............................................................................................................................................................127 include()............................................................................................................................................................128 require_once()..................................................................................................................................................131 include_once() ..................................................................................................................................................133 12. Funciones ..............................................................................................................................................................135 Funciones definidas por el usuario ....................................................................................................................137 Parámetros de las funciones ..............................................................................................................................137 Pasar parámetros por referencia...............................................................................................................137 Parámetros por defecto ............................................................................................................................138 Lista de longitud variable de parámetros.................................................................................................139 Devolver valores................................................................................................................................................139 old_function.................................................................................................................................................139 Funciones variable.............................................................................................................................................139 13. Clases y Objetos....................................................................................................................................................141 class ................................................................................................................................................................143 7
  • 8. 14. References Explained............................................................................................................................................145 What are References..........................................................................................................................................147 What do References ..........................................................................................................................................147 What aren’t References .....................................................................................................................................147 Returning References ........................................................................................................................................147 Unsetting References.........................................................................................................................................148 Spotting the Reference ......................................................................................................................................148 global References..................................................................................................................................148 $this.......................................................................................................................................................148 III. Características..............................................................................................................................................................149 15. Manejando errores ................................................................................................................................................149 16. Creando imágenes GIF .........................................................................................................................................153 17. Autentificación HTTP con PHP............................................................................................................................157 18. Cookies .................................................................................................................................................................161 19. El envío de archivos ..............................................................................................................................................165 Envío de archivos con el método POST............................................................................................................167 Errores comunes................................................................................................................................................167 Envío de más de un archivo...............................................................................................................................167 Soporte del método PUT...................................................................................................................................168 20. Usando archivos remotos ......................................................................................................................................171 21. Manejando conexiones..........................................................................................................................................175 22. Conexiones persistentes a bases de datos .............................................................................................................179 IV. Referencia de las Funciones ........................................................................................................................................183 I. Funciones específicas de Apache ............................................................................................................................183 apache_lookup_uri ............................................................................................................................................185 apache_note.......................................................................................................................................................185 getallheaders......................................................................................................................................................185 virtual ................................................................................................................................................................186 II. Funciones de matrices ............................................................................................................................................187 array...................................................................................................................................................................189 array_count_values............................................................................................................................................189 array_flip ...........................................................................................................................................................189 array_keys .........................................................................................................................................................190 array_merge.......................................................................................................................................................190 array_pad...........................................................................................................................................................191 array_pop...........................................................................................................................................................191 array_push .........................................................................................................................................................192 array_reverse .....................................................................................................................................................192 array_shift..........................................................................................................................................................193 array_slice .........................................................................................................................................................193 array_splice .......................................................................................................................................................194 array_unshift......................................................................................................................................................195 array_values.......................................................................................................................................................195 array_walk .........................................................................................................................................................196 arsort..................................................................................................................................................................196 asort ...................................................................................................................................................................197 compact .............................................................................................................................................................197 count ..................................................................................................................................................................198 current................................................................................................................................................................198 each....................................................................................................................................................................199 end .....................................................................................................................................................................200 extract ................................................................................................................................................................200 in_array..............................................................................................................................................................201 key .....................................................................................................................................................................201 krsort..................................................................................................................................................................202 8
  • 9. ksort ...................................................................................................................................................................202 list ......................................................................................................................................................................202 next ....................................................................................................................................................................203 pos .....................................................................................................................................................................203 prev....................................................................................................................................................................204 rango..................................................................................................................................................................204 reset ...................................................................................................................................................................204 rsort....................................................................................................................................................................204 shuffle ................................................................................................................................................................205 sizeof .................................................................................................................................................................205 sort .....................................................................................................................................................................205 uasort .................................................................................................................................................................206 uksort.................................................................................................................................................................206 usort ...................................................................................................................................................................207 III. Funciones Ortográficas .........................................................................................................................................209 aspell_new.........................................................................................................................................................211 aspell_check ......................................................................................................................................................211 aspell_check-raw...............................................................................................................................................211 aspell_suggest....................................................................................................................................................212 IV. Funciones matemáticas de precisión arbitraria.....................................................................................................213 bcadd .................................................................................................................................................................215 bccomp ..............................................................................................................................................................215 bcdiv ..................................................................................................................................................................215 bcmod................................................................................................................................................................215 bcmul.................................................................................................................................................................215 bcpow ................................................................................................................................................................216 bcscale ...............................................................................................................................................................216 bcsqrt .................................................................................................................................................................216 bcsub..................................................................................................................................................................216 V. Bzip2 Compression Functions ...............................................................................................................................217 bzclose...............................................................................................................................................................219 bzcompress ........................................................................................................................................................219 bzdecompress ....................................................................................................................................................219 bzerrno...............................................................................................................................................................220 bzerror ...............................................................................................................................................................220 bzerrstr...............................................................................................................................................................220 bzflush ...............................................................................................................................................................221 bzopen ...............................................................................................................................................................221 bzread ................................................................................................................................................................221 bzwrite...............................................................................................................................................................222 VI. Funciones de calendario .......................................................................................................................................223 JDToGregorian ..................................................................................................................................................225 GregorianToJD ..................................................................................................................................................225 JDToJulian.........................................................................................................................................................225 JulianToJD.........................................................................................................................................................225 JDToJewish........................................................................................................................................................226 JewishToJD........................................................................................................................................................226 JDToFrench .......................................................................................................................................................226 FrenchToJD .......................................................................................................................................................226 JDMonthName ..................................................................................................................................................226 JDDayOfWeek...................................................................................................................................................227 easter_date .........................................................................................................................................................227 easter_days ........................................................................................................................................................228 VII. CCVS API Functions ..........................................................................................................................................229 231 VIII. soporte de las funciones COM para Windows...................................................................................................233 9
  • 10. com_load ...........................................................................................................................................................235 com_invoke .......................................................................................................................................................235 com_propget......................................................................................................................................................235 com_get .............................................................................................................................................................235 com_propput......................................................................................................................................................235 com_propset ......................................................................................................................................................235 com_set..............................................................................................................................................................235 IX. Funciones de Clases/Objectos ..............................................................................................................................237 get_class_methods.............................................................................................................................................239 get_class_vars....................................................................................................................................................239 get_object_vars..................................................................................................................................................239 method_exists....................................................................................................................................................239 X. Funciones de ClibPDF ...........................................................................................................................................241 cpdf_global_set_document_limits ....................................................................................................................245 cpdf_set_creator ................................................................................................................................................245 cpdf_set_title .....................................................................................................................................................245 cpdf_set_subject ................................................................................................................................................245 cpdf_set_keywords ............................................................................................................................................245 cpdf_open ..........................................................................................................................................................246 cpdf_close..........................................................................................................................................................246 cpdf_page_init...................................................................................................................................................246 cpdf_finalize_page ............................................................................................................................................246 cpdf_finalize ......................................................................................................................................................247 cpdf_output_buffer ............................................................................................................................................247 cpdf_save_to_file...............................................................................................................................................247 cpdf_set_current_page ......................................................................................................................................247 cpdf_begin_text .................................................................................................................................................248 cpdf_end_text ....................................................................................................................................................248 cpdf_show .........................................................................................................................................................248 cpdf_show_xy ...................................................................................................................................................248 cpdf_text............................................................................................................................................................249 cpdf_set_font.....................................................................................................................................................249 cpdf_set_leading................................................................................................................................................249 cpdf_set_text_rendering ....................................................................................................................................250 cpdf_set_horiz_scaling......................................................................................................................................250 cpdf_set_text_rise..............................................................................................................................................250 cpdf_set_text_matrix .........................................................................................................................................250 cpdf_set_text_pos..............................................................................................................................................250 cpdf_set_char_spacing ......................................................................................................................................251 cpdf_set_word_spacing .....................................................................................................................................251 cpdf_continue_text ............................................................................................................................................251 cpdf_stringwidth................................................................................................................................................251 cpdf_save...........................................................................................................................................................251 cpdf_restore.......................................................................................................................................................252 cpdf_translate ....................................................................................................................................................252 cpdf_scale..........................................................................................................................................................252 cpdf_rotate.........................................................................................................................................................252 cpdf_setflat ........................................................................................................................................................253 cpdf_setlinejoin .................................................................................................................................................253 cpdf_setlinecap..................................................................................................................................................253 cpdf_setmiterlimit .............................................................................................................................................253 cpdf_setlinewidth ..............................................................................................................................................253 cpdf_setdash ......................................................................................................................................................254 cpdf_moveto ......................................................................................................................................................254 cpdf_rmoveto.....................................................................................................................................................254 cpdf_curveto......................................................................................................................................................254 10
  • 11. cpdf_lineto.........................................................................................................................................................255 cpdf_rlineto .......................................................................................................................................................255 cpdf_circle .........................................................................................................................................................255 cpdf_arc.............................................................................................................................................................255 cpdf_rect............................................................................................................................................................256 cpdf_closepath...................................................................................................................................................256 cpdf_stroke ........................................................................................................................................................256 cpdf_closepath_stroke .......................................................................................................................................256 cpdf_fill .............................................................................................................................................................256 cpdf_fill_stroke..................................................................................................................................................257 cpdf_closepath_fill_stroke.................................................................................................................................257 cpdf_clip............................................................................................................................................................257 cpdf_setgray_fill................................................................................................................................................257 cpdf_setgray_stroke...........................................................................................................................................258 cpdf_setgray ......................................................................................................................................................258 cpdf_setrgbcolor_fill .........................................................................................................................................258 cpdf_setrgbcolor_stroke ....................................................................................................................................258 cpdf_setrgbcolor................................................................................................................................................258 cpdf_add_outline...............................................................................................................................................259 cpdf_set_page_animation..................................................................................................................................259 cpdf_import_jpeg ..............................................................................................................................................260 cpdf_place_inline_image ..................................................................................................................................260 cpdf_add_annotation .........................................................................................................................................260 XI. CURL, Client URL Library Functions .................................................................................................................261 curl_init .............................................................................................................................................................263 curl_setopt .........................................................................................................................................................263 curl_exec ...........................................................................................................................................................265 curl_close ..........................................................................................................................................................265 curl_version .......................................................................................................................................................265 XII. Funciones de pago electrónico ............................................................................................................................267 cybercash_encr ..................................................................................................................................................269 cybercash_decr ..................................................................................................................................................269 cybercash_base64_encode.................................................................................................................................269 cybercash_base64_decode.................................................................................................................................269 XIII. Character type functions ....................................................................................................................................271 ctype_alnum ......................................................................................................................................................273 ctype_alpha........................................................................................................................................................273 ctype_cntrl.........................................................................................................................................................273 ctype_digit.........................................................................................................................................................273 ctype_lower .......................................................................................................................................................273 ctype_graph .......................................................................................................................................................273 ctype_print.........................................................................................................................................................273 ctype_punct .......................................................................................................................................................274 ctype_space .......................................................................................................................................................274 ctype_upper .......................................................................................................................................................274 ctype_xdigit.......................................................................................................................................................274 XIV. Funciones de la capa de abstraccion de bases de datos (dbm-style)..................................................................275 dba_close...........................................................................................................................................................277 dba_delete..........................................................................................................................................................277 dba_exists ..........................................................................................................................................................277 dba_fetch ...........................................................................................................................................................277 dba_firstkey .......................................................................................................................................................278 dba_insert ..........................................................................................................................................................278 dba_nextkey.......................................................................................................................................................278 dba_popen .........................................................................................................................................................278 dba_open ...........................................................................................................................................................279 11
  • 12. dba_optimize .....................................................................................................................................................279 dba_replace........................................................................................................................................................279 dba_sync............................................................................................................................................................280 XV. Funciones de fecha y hora...................................................................................................................................281 checkdate...........................................................................................................................................................283 date ....................................................................................................................................................................283 getdate ...............................................................................................................................................................284 gettimeofday......................................................................................................................................................284 gmdate ...............................................................................................................................................................285 gmmktime..........................................................................................................................................................285 gmstrftime .........................................................................................................................................................285 microtime ..........................................................................................................................................................286 mktime...............................................................................................................................................................286 strftime ..............................................................................................................................................................287 time....................................................................................................................................................................288 XVI. Funciones para dBase ........................................................................................................................................289 dbase_create ......................................................................................................................................................291 dbase_open ........................................................................................................................................................291 dbase_close........................................................................................................................................................292 dbase_pack ........................................................................................................................................................292 dbase_add_record..............................................................................................................................................292 dbase_replace_record ........................................................................................................................................292 dbase_delete_record ..........................................................................................................................................292 dbase_get_record...............................................................................................................................................293 dbase_get_record_with_names .........................................................................................................................293 dbase_numfields ................................................................................................................................................293 dbase_numrecords.............................................................................................................................................293 XVII. Funciones dbm..................................................................................................................................................295 dbmopen............................................................................................................................................................297 dbmclose............................................................................................................................................................297 dbmexists...........................................................................................................................................................297 dbmfetch............................................................................................................................................................297 dbminsert...........................................................................................................................................................297 dbmreplace ........................................................................................................................................................298 dbmdelete ..........................................................................................................................................................298 dbmfirstkey........................................................................................................................................................298 dbmnextkey .......................................................................................................................................................298 dblist ..................................................................................................................................................................299 XVIII. dbx functions...................................................................................................................................................301 dbx_close...........................................................................................................................................................303 dbx_connect ......................................................................................................................................................303 dbx_error ...........................................................................................................................................................304 dbx_query..........................................................................................................................................................304 dbx_sort.............................................................................................................................................................306 dbx_cmp_asc.....................................................................................................................................................306 dbx_cmp_desc...................................................................................................................................................307 XIX. Funciones con directorios ..................................................................................................................................309 chdir...................................................................................................................................................................311 dir ......................................................................................................................................................................311 closedir ..............................................................................................................................................................311 opendir...............................................................................................................................................................311 readdir................................................................................................................................................................311 rewinddir ...........................................................................................................................................................312 XX. Funciones de DOM XML ...................................................................................................................................313 xmldoc...............................................................................................................................................................315 xmldocfile..........................................................................................................................................................315 12
  • 13. xmltree...............................................................................................................................................................315 XXI. Error Handling and Logging Functions .............................................................................................................317 error_log ............................................................................................................................................................319 error_reporting ..................................................................................................................................................320 restore_error_handler ........................................................................................................................................320 set_error_handler...............................................................................................................................................320 trigger_error ......................................................................................................................................................322 user_error ..........................................................................................................................................................323 XXII. Funciones filePro ..............................................................................................................................................325 filepro ................................................................................................................................................................327 filepro_fieldname...............................................................................................................................................327 filepro_fieldtype ................................................................................................................................................327 filepro_fieldwidth ..............................................................................................................................................327 filepro_retrieve ..................................................................................................................................................327 filepro_fieldcount ..............................................................................................................................................327 filepro_rowcount ...............................................................................................................................................328 XXIII. Funciones del sistema de ficheros ...................................................................................................................329 basename ...........................................................................................................................................................331 chgrp..................................................................................................................................................................331 chmod................................................................................................................................................................331 chown ................................................................................................................................................................332 clearstatcache ....................................................................................................................................................332 copy ...................................................................................................................................................................332 delete .................................................................................................................................................................333 dirname..............................................................................................................................................................333 diskfreespace .....................................................................................................................................................333 fclose .................................................................................................................................................................333 feof ....................................................................................................................................................................334 fgetc ...................................................................................................................................................................334 fgetcsv ...............................................................................................................................................................334 fgets ...................................................................................................................................................................335 fgetss..................................................................................................................................................................335 file......................................................................................................................................................................336 file_exists...........................................................................................................................................................336 fileatime.............................................................................................................................................................336 filectime.............................................................................................................................................................336 filegroup.............................................................................................................................................................337 fileinode.............................................................................................................................................................337 filemtime............................................................................................................................................................337 fileowner............................................................................................................................................................337 fileperms ............................................................................................................................................................337 filesize................................................................................................................................................................338 filetype...............................................................................................................................................................338 flock...................................................................................................................................................................338 fopen..................................................................................................................................................................339 fpassthru ............................................................................................................................................................340 fputs ...................................................................................................................................................................340 fread...................................................................................................................................................................340 fseek ..................................................................................................................................................................340 ftell ....................................................................................................................................................................341 fwrite .................................................................................................................................................................341 set_file_buffer....................................................................................................................................................341 is_dir..................................................................................................................................................................342 is_executable .....................................................................................................................................................342 is_file .................................................................................................................................................................342 is_link ................................................................................................................................................................342 13
  • 14. is_readable.........................................................................................................................................................343 is_writeable .......................................................................................................................................................343 link.....................................................................................................................................................................343 linkinfo ..............................................................................................................................................................343 mkdir .................................................................................................................................................................344 pclose.................................................................................................................................................................344 popen .................................................................................................................................................................344 readfile...............................................................................................................................................................345 readlink..............................................................................................................................................................345 rename ...............................................................................................................................................................345 rewind................................................................................................................................................................345 rmdir ..................................................................................................................................................................346 stat .....................................................................................................................................................................346 lstat ....................................................................................................................................................................347 symlink ..............................................................................................................................................................347 tempnam............................................................................................................................................................347 touch ..................................................................................................................................................................348 umask ................................................................................................................................................................348 unlink.................................................................................................................................................................348 XXIV. Funciones Forms Data Format (Formato de Datos de Formularios) ..............................................................351 fdf_open ............................................................................................................................................................353 fdf_close ............................................................................................................................................................353 fdf_create...........................................................................................................................................................353 fdf_save .............................................................................................................................................................354 fdf_get_value.....................................................................................................................................................354 fdf_set_value .....................................................................................................................................................354 fdf_next_field_name..........................................................................................................................................354 fdf_set_ap ..........................................................................................................................................................355 fdf_set_status.....................................................................................................................................................355 fdf_get_status ....................................................................................................................................................355 fdf_set_file.........................................................................................................................................................355 fdf_get_file ........................................................................................................................................................356 XXV. Funciones FTP..................................................................................................................................................357 ftp_connect ........................................................................................................................................................359 ftp_login ............................................................................................................................................................359 ftp_pwd..............................................................................................................................................................359 ftp_cdup.............................................................................................................................................................359 ftp_chdir ............................................................................................................................................................359 ftp_mkdir...........................................................................................................................................................359 ftp_rmdir............................................................................................................................................................360 ftp_nlist..............................................................................................................................................................360 ftp_rawlist..........................................................................................................................................................360 ftp_systype ........................................................................................................................................................360 ftp_pasv .............................................................................................................................................................360 ftp_get................................................................................................................................................................361 ftp_fget ..............................................................................................................................................................361 ftp_put ...............................................................................................................................................................361 ftp_fput ..............................................................................................................................................................361 ftp_size ..............................................................................................................................................................362 ftp_mdtm ...........................................................................................................................................................362 ftp_rename.........................................................................................................................................................362 ftp_delete ...........................................................................................................................................................362 ftp_quit ..............................................................................................................................................................362 XXVI. Function Handling functions...........................................................................................................................365 call_user_func ...................................................................................................................................................367 create_function ..................................................................................................................................................367 14
  • 15. func_get_arg......................................................................................................................................................369 func_get_args ....................................................................................................................................................369 func_num_args ..................................................................................................................................................370 function_exists...................................................................................................................................................370 register_shutdown_function ..............................................................................................................................371 XXVII. GNU Gettext..................................................................................................................................................373 bindtextdomain..................................................................................................................................................375 dcgettext ............................................................................................................................................................375 dgettext ..............................................................................................................................................................375 gettext ................................................................................................................................................................375 textdomain.........................................................................................................................................................375 XXVIII. GMP functions .............................................................................................................................................377 gmp_init ............................................................................................................................................................379 gmp_intval.........................................................................................................................................................379 gmp_strval .........................................................................................................................................................379 gmp_add............................................................................................................................................................380 gmp_sub ............................................................................................................................................................380 gmp_mul............................................................................................................................................................380 gmp_div_q.........................................................................................................................................................380 gmp_div_r .........................................................................................................................................................380 gmp_div_qr .......................................................................................................................................................381 gmp_div.............................................................................................................................................................381 gmp_mod...........................................................................................................................................................381 gmp_divexact ....................................................................................................................................................382 gmp_cmp...........................................................................................................................................................382 gmp_neg ............................................................................................................................................................382 gmp_abs ............................................................................................................................................................382 gmp_sign ...........................................................................................................................................................382 gmp_fact............................................................................................................................................................382 gmp_sqrt............................................................................................................................................................383 gmp_sqrtrm .......................................................................................................................................................383 gmp_perfect_square ..........................................................................................................................................383 gmp_pow...........................................................................................................................................................383 gmp_powm........................................................................................................................................................383 gmp_prob_prime ...............................................................................................................................................384 gmp_gcd............................................................................................................................................................384 gmp_gcdext .......................................................................................................................................................384 gmp_invert.........................................................................................................................................................384 gmp_legendre ....................................................................................................................................................384 gmp_jacobi ........................................................................................................................................................385 gmp_random......................................................................................................................................................385 gmp_and............................................................................................................................................................385 gmp_or ..............................................................................................................................................................385 gmp_xor ............................................................................................................................................................385 gmp_setbit .........................................................................................................................................................386 gmp_clrbit .........................................................................................................................................................386 gmp_scan0.........................................................................................................................................................386 gmp_scan1.........................................................................................................................................................386 gmp_popcount...................................................................................................................................................386 gmp_hamdist .....................................................................................................................................................387 XXIX. Funciones HTTP.............................................................................................................................................389 header ................................................................................................................................................................391 setcookie............................................................................................................................................................391 XXX. Funciones para Hyperwave ..............................................................................................................................393 hw_Array2Objrec..............................................................................................................................................397 hw_Children ......................................................................................................................................................397 15