cvs: phpdoc-es /reference/domxml/functions DomNode-owner-document.xml DomNode-parent-node.xml DomNode-prefix.xml DomNode-previous-sibling.xml
DomNode-remove-child.xml DomNode-replace-child.xml DomNode-replace-node.xml DomNode-set-content.xml DomNode-set-name.xml DomNode-set-namespace.xml
DomNode-unlink-node.xml DomProcessingInstruction-data.xml DomProcessingInstruction-target.xml /reference/filesystem/functions fileowner.xml
fileperms.xml filesize.xml filetype.xml flock.xml fopen.xml /reference/ftp/functions ftp-exec.xml /reference/image/functions imagegif.xml
/reference/info/functions ini-set.xml

From: Date: Tue, 22 Jun 2004 02:07:36 +0000
Subject: cvs: phpdoc-es /reference/domxml/functions DomNode-owner-document.xml DomNode-parent-node.xml DomNode-prefix.xml DomNode-previous-sibling.xml
DomNode-remove-child.xml DomNode-replace-child.xml DomNode-replace-node.xml DomNode-set-content.xml DomNode-set-name.xml DomNode-set-namespace.xml
DomNode-unlink-node.xml DomProcessingInstruction-data.xml DomProcessingInstruction-target.xml /reference/filesystem/functions fileowner.xml
fileperms.xml filesize.xml filetype.xml flock.xml fopen.xml /reference/ftp/functions ftp-exec.xml /reference/image/functions imagegif.xml
/reference/info/functions ini-set.xml
Groups: php.doc.es 
Request: Send a blank email to doc-es+get-627@lists.php.net to get a copy of this message
lboshell Mon Jun 21 22:07:36 2004 EDT Added files: /phpdoc-es/reference/domxml/functions DomNode-owner-document.xml DomNode-parent-node.xml DomNode-prefix.xml DomNode-previous-sibling.xml DomNode-remove-child.xml DomNode-replace-child.xml DomNode-replace-node.xml DomNode-set-content.xml DomNode-set-name.xml DomNode-set-namespace.xml DomNode-unlink-node.xml DomProcessingInstruction-data.xml DomProcessingInstruction-target.xml Modified files: /phpdoc-es/reference/filesystem/functions fileowner.xml fileperms.xml filesize.xml filetype.xml flock.xml fopen.xml /phpdoc-es/reference/ftp/functions ftp-exec.xml /phpdoc-es/reference/image/functions imagegif.xml /phpdoc-es/reference/info/functions ini-set.xml Log: - Nuevos archivos de domxml - Actualizaciones y correcciones

http://cvs.php.net/diff.php/phpdoc-es/reference/filesystem/functions/fileowner.xml?r1=1.1&r2=1.2&ty=u Index: phpdoc-es/reference/filesystem/functions/fileowner.xml diff -u phpdoc-es/reference/filesystem/functions/fileowner.xml:1.1 phpdoc-es/reference/filesystem/functions/fileowner.xml:1.2 --- phpdoc-es/reference/filesystem/functions/fileowner.xml:1.1 Sun Apr 14 20:13:55 2002 +++ phpdoc-es/reference/filesystem/functions/fileowner.xml Mon Jun 21 22:07:36 2004 @@ -1,27 +1,33 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- splitted from ./es/functions/filesystem.xml, last change in rev 1.1 --> -<!-- last change to 'fileowner' in en/ tree in rev 1.2 --> +<!-- $Revision: 1.2 $ --> +<!-- EN-Revision: 1.5 Maintainer: lboshell Status: ready --> +<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 --> <refentry id="function.fileowner"> <refnamediv> <refname>fileowner</refname> - <refpurpose>Obtiene el propietario del fichero</refpurpose> + <refpurpose>Obtiene el due&ntilde;o del archivo</refpurpose> </refnamediv> <refsect1> <title>Descripci&oacute;n</title> <methodsynopsis> - <type>int</type><methodname>fileowner</methodname> - <methodparam><type>string</type><parameter>filename</parameter></methodparam> + <type>int</type><methodname>fileowner</methodname> + <methodparam><type>string</type><parameter>nombre_archivo</parameter></methodparam> </methodsynopsis> - <para> - Devuelve el identificador (ID) de usuario del propietario del - fichero, o &false; en caso de error. El ID de usuario se devuelve - en formato num&eacute;rico, usar <function>posix_getpwuid</function> para - obtener el nombre del usuario. - </para> <para> - Los resultados de esta funci&oacute;n son cacheados. Ver - <function>clearstatcache</function> para m&aacute;s detalles. + Devuelve el ID de usuario del due&ntilde;o del archivo, o &false; + en caso de fallo. El ID de usuario es devuelto en formato + num&eacute;rico, uso <function>posix_getpwuid</function> para + convertirlo en un nombre de usuario. </para> + + &note.clearstatcache; + + &tip.fopen-wrapper.stat; + + <simpara> + Vea tambi&eacute;n <function>stat</function> + </simpara> + </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc-es/reference/filesystem/functions/fileperms.xml?r1=1.1&r2=1.2&ty=u Index: phpdoc-es/reference/filesystem/functions/fileperms.xml diff -u phpdoc-es/reference/filesystem/functions/fileperms.xml:1.1 phpdoc-es/reference/filesystem/functions/fileperms.xml:1.2 --- phpdoc-es/reference/filesystem/functions/fileperms.xml:1.1 Sun Apr 14 20:13:56 2002 +++ phpdoc-es/reference/filesystem/functions/fileperms.xml Mon Jun 21 22:07:36 2004 @@ -1,24 +1,30 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- splitted from ./es/functions/filesystem.xml, last change in rev 1.1 --> -<!-- last change to 'fileperms' in en/ tree in rev 1.2 --> +<!-- $Revision: 1.2 $ --> +<!-- EN-Revision: 1.4 Maintainer: lboshell Status: ready --> +<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 --> <refentry id="function.fileperms"> <refnamediv> <refname>fileperms</refname> - <refpurpose>Obtiene los permisos del fichero</refpurpose> + <refpurpose>Obtiene los permisos del archivo</refpurpose> </refnamediv> <refsect1> <title>Descripci&oacute;n</title> <methodsynopsis> - <type>int</type><methodname>fileperms</methodname> - <methodparam><type>string</type><parameter>filename</parameter></methodparam> + <type>int</type><methodname>fileperms</methodname> + <methodparam><type>string</type><parameter>nombre_archivo</parameter></methodparam> </methodsynopsis> - <para> - Devuelve los permisos del fichero, o &false; en caso de error. - </para> <para> - Los resultados de esta funci&oacute;n son cacheados. Ver - <function>clearstatcache</function> para m&aacute;s detalles. + Devuelve los permisos del archivo, o &false; en caso de fallo. </para> + + &note.clearstatcache; + + &tip.fopen-wrapper.stat; + + <simpara> + Vea tambi&eacute;n <function>is_readable</function>, y + <function>stat</function> + </simpara> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc-es/reference/filesystem/functions/filesize.xml?r1=1.1&r2=1.2&ty=u Index: phpdoc-es/reference/filesystem/functions/filesize.xml diff -u phpdoc-es/reference/filesystem/functions/filesize.xml:1.1 phpdoc-es/reference/filesystem/functions/filesize.xml:1.2 --- phpdoc-es/reference/filesystem/functions/filesize.xml:1.1 Sun Apr 14 20:13:56 2002 +++ phpdoc-es/reference/filesystem/functions/filesize.xml Mon Jun 21 22:07:36 2004 @@ -1,24 +1,57 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- splitted from ./es/functions/filesystem.xml, last change in rev 1.1 --> -<!-- last change to 'filesize' in en/ tree in rev 1.2 --> +<!-- $Revision: 1.2 $ --> +<!-- EN-Revision: 1.6 Maintainer: lboshell Status: ready --> +<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 --> <refentry id="function.filesize"> <refnamediv> <refname>filesize</refname> - <refpurpose>Obtiene el tama&ntilde;o del fichero</refpurpose> + <refpurpose>Obtiene el tama&ntilde;o del archivo</refpurpose> </refnamediv> <refsect1> <title>Descripci&oacute;n</title> <methodsynopsis> - <type>int</type><methodname>filesize</methodname> - <methodparam><type>string</type><parameter>filename</parameter></methodparam> + <type>int</type><methodname>filesize</methodname> + <methodparam><type>string</type><parameter>nombre_archivo</parameter></methodparam> </methodsynopsis> - <para> - Devuelve el tama&ntilde;o del fichero, o &false; en caso de error. + <para> + Devuelve el tama&ntilde;o del archivo en bytes, o &false; en caso + de fallo. </para> + <note> + <simpara> + Dado que el tipo entero de PHP tiene signo y muchas plataformas + usan enteros de 32 bits, <function>filesize</function> puede + devolver resultados inesperados para archivos con un + tama&ntilde;o mayor de 2GB. Para archivos entre 2GB y 4GB de + tama&ntilde;o, esto puede resolverse por lo general usando + <literal>sprintf("%u", filesize($archivo))</literal>. + </simpara> + </note> + + &note.clearstatcache; + + &tip.fopen-wrapper.stat; + <para> - Los resultados de esta funci&oacute;n son cacheados. Ver - <function>clearstatcache</function> para m&aacute;s detalles. + <example> + <title>Ejemplo de <function>filesize</function></title> + <programlisting role="php"> +<![CDATA[ +<?php + +// imprime, p.ej. un_archivo.txt: 1024 bytes + +$nombre_archivo = 'un_archivo.txt'; +echo $nombre_archivo . ': ' . filesize($nombre_archivo) . ' bytes'; + +?> +]]> + </programlisting> + </example> </para> + <simpara> + Vea tambi&eacute;n <function>file_exists</function> + </simpara> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc-es/reference/filesystem/functions/filetype.xml?r1=1.1&r2=1.2&ty=u Index: phpdoc-es/reference/filesystem/functions/filetype.xml diff -u phpdoc-es/reference/filesystem/functions/filetype.xml:1.1 phpdoc-es/reference/filesystem/functions/filetype.xml:1.2 --- phpdoc-es/reference/filesystem/functions/filetype.xml:1.1 Sun Apr 14 20:13:57 2002 +++ phpdoc-es/reference/filesystem/functions/filetype.xml Mon Jun 21 22:07:36 2004 @@ -1,26 +1,54 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- splitted from ./es/functions/filesystem.xml, last change in rev 1.1 --> -<!-- last change to 'filetype' in en/ tree in rev 1.2 --> +<!-- $Revision: 1.2 $ --> +<!-- EN-Revision: 1.10 Maintainer: lboshell Status: ready --> +<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 --> <refentry id="function.filetype"> <refnamediv> <refname>filetype</refname> - <refpurpose>Obtiene el tipo de fichero</refpurpose> + <refpurpose>Obtiene el tipo de archivo</refpurpose> </refnamediv> <refsect1> <title>Descripci&oacute;n</title> <methodsynopsis> - <type>string</type><methodname>filetype</methodname> - <methodparam><type>string</type><parameter>filename</parameter></methodparam> + <type>string</type><methodname>filetype</methodname> + <methodparam><type>string</type><parameter>nombre_archivo</parameter></methodparam> </methodsynopsis> - <para> - Devuelve el tipo de fichero. Valores posibles son fifo, char, - dir, block, link, file, y unknown.</para> <para> Devuelve &false; - si ocurre un error. + <para> + Devuelve el tipo del archivo. Los posibles valores son fifo, + char, dir, block, link, file, y unknown. + </para> + <para> + Devuelve &false; si ocurre un + error. <function>filetype</function> producir&aacute; siempre un + mensaje <constant>E_NOTICE</constant> si el llamado a stat falla + o el tipo de archivo es desconocido. </para> + + &note.clearstatcache; + + &tip.fopen-wrapper.stat; + <para> - Los resultados de esta funci&oacute;n son cacheados. Ver - <function>clearstatcache</function> para m&aacute;s detalles. + <example> + <title>Ejemplo de <function>filetype</function></title> + <programlisting role="php"> +<![CDATA[ +<?php + +echo filetype('/etc/passwd'); // file +echo filetype('/etc/'); // dir + +?> +]]> + </programlisting> + </example> </para> + <simpara> + Vea tambi&eacute;n <function>is_dir</function>, + <function>is_file</function>, <function>is_link</function>, + <function>file_exists</function>, <function>stat</function>, y + <function>mime_content_type</function>. + </simpara> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc-es/reference/filesystem/functions/flock.xml?r1=1.1&r2=1.2&ty=u Index: phpdoc-es/reference/filesystem/functions/flock.xml diff -u phpdoc-es/reference/filesystem/functions/flock.xml:1.1 phpdoc-es/reference/filesystem/functions/flock.xml:1.2 --- phpdoc-es/reference/filesystem/functions/flock.xml:1.1 Sun Apr 14 20:13:57 2002 +++ phpdoc-es/reference/filesystem/functions/flock.xml Mon Jun 21 22:07:36 2004 @@ -1,67 +1,135 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- splitted from ./es/functions/filesystem.xml, last change in rev 1.1 --> -<!-- last change to 'flock' in en/ tree in rev 1.2 --> +<!-- $Revision: 1.2 $ --> +<!-- EN-Revision: 1.9 Maintainer: lboshell Status: ready --> +<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 --> <refentry id="function.flock"> <refnamediv> <refname>flock</refname> - <refpurpose>Bloqueo de ficheros portable y asesorado</refpurpose> + <refpurpose>Aviso de bloqueo de archivos portable</refpurpose> </refnamediv> <refsect1> - <title>Description</title> + <title>Descripci&oacute;n</title> <methodsynopsis> - <type>bool</type><methodname>flock</methodname> - <methodparam><type>int</type><parameter>fp</parameter></methodparam> - <methodparam><type>int</type><parameter>operation</parameter></methodparam> + <type>bool</type><methodname>flock</methodname> + <methodparam><type>resource</type><parameter>gestor</parameter></methodparam> + <methodparam><type>int</type><parameter>operacion</parameter></methodparam> + <methodparam choice="opt"><type>int</type><parameter>&amp;bloquearia</parameter></methodparam> </methodsynopsis> <simpara> - PHP soporta un m&eacute;todo portable de bloquear ficheros completos de - manera asesorada (lo que significa que todos los programas que acceden - tienen que usar el mismo modo de bloqueo o &eacute;ste no funcionar&aacute;). + PHP soporta una manera portable de bloquear archivos enteros de + por medio de avisos (lo que quiere decir que todos los programas + que acceden al archivo deben usar el mismo mecanismo de bloqueo, + o no funcionar&aacute;). </simpara> + <note> + <para> + <function>flock</function> es obligatorio bajo Windows. + </para> + </note> <simpara> - <function>flock</function> opera sobre <parameter>fp</parameter> - el cual debe ser un apuntador a un fichero - abierto. <parameter>operation</parameter> toma uno de los siguientes - valores: + <function>flock</function> opera sobre + <parameter>gestor</parameter>, que debe ser un apuntador a un + archivo abierto. <parameter>operacion</parameter> es uno de los + siguientes valores: </simpara> <para> <itemizedlist> <listitem> <simpara> - Para que adquiera un bloqueo compartido (lectura), - fija <parameter>operation</parameter> a 1. + Para adquirir un bloqueo compartido (de lectura), defina + <parameter>operacion</parameter> a + <constant>LOCK_SH</constant> (o use 1 antes de PHP 4.0.1). </simpara> </listitem> <listitem> <simpara> - Para adquirir un bloqueo exclusivo (escritura), - fija <parameter>operation</parameter> a 2. + Para adquirir un bloqueo exclusizo (de escritura), defina + <parameter>operacion</parameter> a + <constant>LOCK_EX</constant> (o use 2 antes de PHP 4.0.1). </simpara> </listitem> <listitem> <simpara> - Para liberar un bloqueo (compartido o exclusivo), - fija <parameter>operation</parameter> a 3. + Para liberar un bloqueo (compartido o exclusivo), defina + <parameter>operacion</parameter> a + <constant>LOCK_UN</constant> (o use 3 antes de PHP 4.0.1). </simpara> </listitem> <listitem> <simpara> - Si no quieres que <function>flock</function> bloquee mientras - est&aacute; activado, suma 4 al valor de <parameter>operation</parameter>. + Si no desea que <function>flock</function> bloquee mientras + opera, agregue <constant>LOCK_NB</constant> (4 antes de PHP + 4.0.1) a <parameter>operacion</parameter>. </simpara> </listitem> </itemizedlist> </para> <simpara> - <function>flock</function> permite establece un modelo simple - de lectura/escritura el cual puede usarse en pr&aacute;cticamente - cualquier plataforma (incluyendo la mayoria de sistemas Unix e - incluso Windows). + <function>flock</function> le permite ejecutar un modelo de + lectura/escritura simple que puede ser usado en + pr&aacute;cticamente cualquier plataforma (incluyendo la + mayor&iacute;a de derivaciones de Unix e incluso Windows). El + tercer argumento opcional recibe el valor &true; si el aviso + producir&iacute;a un bloqueo (la condici&oacute;n EWOULDBLOCK) </simpara> <simpara> - <function>flock</function> devuelve &true; en caso de &eacute;xito y &false; - en caso de error (ej. cuando no se puede establecer un bloqueo). + &return.success; </simpara> + <para> + <example> + <title>Ejemplo de <function>flock</function></title> + <programlisting role="php"> +<![CDATA[ +<?php + +$aa = fopen("/tmp/bloqueo.txt", "w+"); + +if (flock($aa, LOCK_EX)) { // realizar un bloqueo exclusivo + fwrite($aa, "Escribir algo aqui\n"); + flock($aa, LOCK_UN); // liberar el aviso +} else { + echo "&iexcl;No se pudo bloquear el archivo!"; +} + +fclose($aa); + +?> +]]> + </programlisting> + </example> + </para> + <note> + <para> + Dado que <function>flock</function> requiere un apuntador de + archivo, puede que necesite usar un archivo especial de bloqueo + para proteger el acceso a un archivo que pretende truncar + abri&eacute;ndolo en modo de escritura (con un argumento "w" o + "w+" a <function>fopen</function>). + </para> + </note> + <warning> + <para> + <function>flock</function> no trabajar&aacute; sobre NFS y + muchos otros sistemas de archivos en red. Revise la + documentaci&oacute;n de su sistema operativo para m&aacute;s + detalles. + </para> + <para> + En algunos sistemas operativos <function>flock</function> se + implementa al nivel de proceso. Cuando usa una API de servidor + multi-hilos como ISAPI, &iexcl;es posible que no pueda depender + en <function>flock</function> para proteger archivos contra + otros scripts PHP corriendo en hilos paralelos en la misma + instancia de servidor! + </para> + <para> + <function>flock</function> no es soportado en sistemas de + archivos anticuados como <literal>FAT</literal> y sus derivados, + y por lo tanto siempre devolver&aacute; &false; bajo tales + entornos (esto es especialmente cierto para usuarios de Windows + 98). + </para> + </warning> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc-es/reference/filesystem/functions/fopen.xml?r1=1.1&r2=1.2&ty=u Index: phpdoc-es/reference/filesystem/functions/fopen.xml diff -u phpdoc-es/reference/filesystem/functions/fopen.xml:1.1 phpdoc-es/reference/filesystem/functions/fopen.xml:1.2 --- phpdoc-es/reference/filesystem/functions/fopen.xml:1.1 Sun Apr 14 20:13:58 2002 +++ phpdoc-es/reference/filesystem/functions/fopen.xml Mon Jun 21 22:07:36 2004 @@ -1,128 +1,304 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- splitted from ./es/functions/filesystem.xml, last change in rev 1.1 --> -<!-- last change to 'fopen' in en/ tree in rev 1.2 --> +<!-- $Revision: 1.2 $ --> +<!-- EN-Revision: 1.24 Maintainer: lboshell Status: ready --> +<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 --> <refentry id="function.fopen"> <refnamediv> <refname>fopen</refname> - <refpurpose>Abre un fichero o una URL</refpurpose> + <refpurpose>Abre un archivo o URL</refpurpose> </refnamediv> <refsect1> <title>Descripci&oacute;n</title> <methodsynopsis> - <type>int</type><methodname>fopen</methodname> - <methodparam><type>string</type><parameter>filename</parameter></methodparam> - <methodparam><type>string</type><parameter>mode</parameter></methodparam> - <methodparam choice="opt"><type>int</type><parameter> - use_include_path - </parameter></methodparam> + <type>resource</type><methodname>fopen</methodname> + <methodparam><type>string</type><parameter>nombre_archivo</parameter></methodparam> + <methodparam><type>string</type><parameter>modo</parameter></methodparam> + <methodparam choice="opt"><type>bool</type><parameter>usar_ruta_inclusion</parameter></methodparam> + <methodparam choice="opt"><type>resource</type><parameter>contexto_z</parameter></methodparam> </methodsynopsis> <simpara> - Si <parameter>filename</parameter> comienza con "http://" (no es - sensible a may&uacute;sculas), se abre una conexi&oacute;n HTTP 1.0 hacia el - servidor especificado y se devuelve un apuntador de fichero al comienzo - del texto de respuesta. + <function>fopen</function> asocia un recurso con nombre, + especificado por <parameter>nombre_archivo</parameter>, a una + secuencia. Si <parameter>nombre_archivo</parameter> es de la + forma "esquema://...", se asume que es una URL y PHP + buscar&aacute; por un gestor de protocolo (tambi&eacute;n + conocido como envoltura) para tal esquema. Si no hay envolturas + registradas para ese protocolo, PHP emitir&aacute; una noticia + para ayudarle a rastrear problemas potenciales en su script, y + luego contin&uacute;a como si + <parameter>nombre_archivo</parameter> indicara un archivo + corriente. </simpara> <simpara> - No maneja redirecciones HTTP, por eso se debe incluir una barra - final cuando se trata de directorios. + Si PHP decide que <parameter>nombre_archivo</parameter> hace + referencia a un archivo local, entonces intentar&aacute; abrir + una secuencia sobre ese archivo. El archivo debe ser asequible + para PHP, as&iacute; que debe asegurarse de que los permisos de + acceso del archivo sean los apropiados. Si tiene habilitado + &safemode;, o <link + linkend="ini.open-basedir">open_basedir</link>, pueden aplicarse + mayores restricciones. </simpara> <simpara> - Si <parameter>filename</parameter> comienza con "ftp://" (no es - sensible a may&uacute;sculas), se abre una conexi&oacute;n ftp hacia el servidor - especificado y se devuelve un apuntador al fichero requerido. Si el - servidor no soporta ftp en modo pasivo, esto fallar&aacute;. Se pueden - abrir fichero via ftp para leer o para escribir (pero no ambas - cosas simult&aacute;neamente). - </simpara> - <simpara> - Si <parameter>filename</parameter> no comienza con nada de lo anterior, - el fichero se abre del sistema de ficheros, y se devuelve un apuntador - al fichero abierto. - </simpara> - <simpara> - Si el abrir el fichero falla, la funci&oacute;n devuelve &false;. + Si PHP decide que <parameter>nombre_archivo</parameter> hace + referencia a un protocolo registrado, y ese protocolo est&aacute; + registrado como una URL de red, PHP verificar&aacute; que <link + linkend="ini.allow-url-fopen">allow_url_fopen</link> se encuentre + habilitado. Si no es as&iacute;, PHP emitir&aacute; una + advertencia y la llamada a fopen fallar&aacute;. </simpara> + <note> + <simpara> + La lista de protocolos soportados puede encontrarse en <xref + linkend="wrappers"/>. Algunos protocolos (tambi&eacute;n + conocidos como <literal>envolturas</literal>) soportan un + <literal>contexto</literal> u opciones + &php.ini;. Refi&eacute;rase a la p&aacute;gina espec&iacute;fica + del protocolo en uso para una lista de opciones que pueden + definirse. (Por ejemplo, el valor &php.ini; + <literal>user_agent</literal> usado por la envoltura + <literal>http</literal>) Para una descripci&oacute;n de los + <literal>contextos</literal> y el par&aacute;metro + <parameter>contexto_z</parameter>, consulte <xref + linkend="ref.stream"/>. + </simpara> + </note> + &note.context-support; <para> - <parameter>mode</parameter> puede ser cualquiera de lo siguiente: - <itemizedlist> - <listitem> - <simpara> - 'r' - Abre para s&oacute;lo lectura; sit&uacute;a el apuntador del fichero al - comienzo del mismo. - </simpara> - </listitem> - <listitem> - <simpara> - 'r+' - Abre para lectura y escritura; situa el apuntador del fichero - al comienzo del fichero. - </simpara> - </listitem> - <listitem> - <simpara> - 'w' - Abre para s&oacute;lo escritura; sit&uacute;a el apuntador del fichero al - comienzo del fichero y trunca el fichero con longitud cero. - Si el fichero no existe, trata de crearlo. - </simpara> - </listitem> - <listitem> - <simpara> - 'w+' - Abre el fichero para lectura y escritura; sit&uacute;a el apuntador - del fichero al comienzo del fichero y trunca el fichero con longitud - cero. Si el fichero no existe, trata de crearlo. - </simpara> - </listitem> - <listitem> - <simpara> - 'a' - Abre s&oacute;lo para escribir (a&ntilde;adir); sit&uacute;a el apuntador del fichero al - final del mismo. Si el fichero no existe, trata de crearlo. - </simpara> - </listitem> - <listitem> - <simpara> - 'a+' - Abre para lectura y escritura (a&ntilde;adiendo); sit&uacute;a el apuntador - del fichero al final del mismo. Si el fichero no existe, trata de crearlo. - </simpara> - </listitem> - </itemizedlist> - Adem&aacute;s, <parameter>mode</parameter> puede contener la letra - 'b'. Esto es &uacute;til para sistemas que diferencian entre ficheros - binarios y de texto (ej. es in&uacute;til en Unix). Si no se necesita, - ser&aacute; ignorado. + El par&aacute;metro <parameter>modo</parameter> especifica el + tipo de acceso que requiere para la secuencia. Puede ser + cualquiera de los siguientes valores: + <table> + <title> + Una lista de modos posibles para <function>fopen</function> + usando <parameter>modo</parameter> + </title> + <tgroup cols="2"> + <thead> + <row> + <entry><parameter>modo</parameter></entry> + <entry>Descripci&oacute;n</entry> + </row> + </thead> + <tbody> + <row> + <entry><literal>'r'</literal></entry> + <entry> + Apertura para s&oacute;lo lectura; ubica el apuntador de + archivo al comienzo del mismo. + </entry> + </row> + <row> + <entry><literal>'r+'</literal></entry> + <entry> + Apertura para lectura y escritura; ubica el apuntador de + archivo al comienzo del mismo. + </entry> + </row> + <row> + <entry><literal>'w'</literal></entry> + <entry> + Apertura para s&oacute;lo escritura; ubica el apuntador de + archivo al comienzo de &eacute;ste y lo trunca a una + longitud de cero. Si el archivo no existe, intenta crearlo. + </entry> + </row> + <row> + <entry><literal>'w+'</literal></entry> + <entry> + Apertura para lectura y escritura; ubica el apuntador de + archivo al comienzo de &eacute;ste y lo trunca a una + longitud cero. Si el archivo no existe, intenta crearlo. + </entry> + </row> + <row> + <entry><literal>'a'</literal></entry> + <entry> + Apertura para s&oacute;lo escritura; ubica el apuntador de + archivo al final del mismo. Si el archivo no existe, intenta + crearlo. + </entry> + </row> + <row> + <entry><literal>'a+'</literal></entry> + <entry> + Apertura para lectura y escritura; ubica el apuntador de + archivo al final del mismo. Si el archivo no existe, intenta + crearlo. + </entry> + </row> + <row> + <entry><literal>'x'</literal></entry> + <entry> + Creaci&oacute;n y apertura para s&oacute;lo escritura; ubica + el apuntador de archivo al comienzo de &eacute;ste. Si el + archivo ya existe, la llamada a <function>fopen</function> + fallar&aacute; devolviendo &false; y generando un error de + nivel <constant>E_WARNING</constant>. Si el archivo no + existe, intenta crearlo. Esto es equivalente a especificar + las banderas <literal>O_EXCL|O_CREAT</literal> en la llamada + de sistema <literal>open(2)</literal> interna. Esta + opci&oacute;n es soportada en PHP 4.3.2 y versiones + posteriores, y s&oacute;lo funciona con archivos locales. + </entry> + </row> + <row> + <entry><literal>'x+'</literal></entry> + <entry> + Creaci&oacute;n y apertura para lectura y escritura; ubica + el apuntador de archivo al comienzo de &eacute;ste. Si el + archivo ya existe, la llamada a <function>fopen</function> + fallar&aacute; devolviendo &false; y generando un error de + nivel <constant>E_WARNING</constant>. Si el archivo no + existe, intenta crearlo. Esto es equivalente a especificar + las banderas <literal>O_EXCL|O_CREAT</literal> en la llamada + de sistema <literal>open(2)</literal> interna. Esta + opci&oacute;n es soportada en PHP 4.3.2 y versiones + posteriores, y s&oacute;lo funciona con archivos locales. + </entry> + </row> + </tbody> + </tgroup> + </table> </para> + <note> + <para> + Diferentes familias de sistemas operativos tienen diferentes + convenciones sobre el final-de-l&iacute;nea. Cuando escribe a un + archivo de texto y desea insertar un salto de l&iacute;nea, + necesita usar los caracteres correctos de final-de-l&iacute;nea + para su sistema operativo. Los sistemas basados en Unix usan + <literal>\n</literal> como el caracter de final de l&iacute;nea, + los sistemas basados en Windows usan <literal>\r\n</literal> + como los caracteres de final de l&iacute;nea, y los sistemas + basados en Macintosh usan <literal>\r</literal> como el caracter + de final de l&iacute;nea. + </para> + <para> + Si usa los caracteres de final de l&iacute;nea equivocados + cuando crea sus archivos, puede que encuentre que otras + aplicaciones que abren esos archivos lucir&aacute;n + "extra&ntilde;o". + </para> + <para> + Windows ofrece una bandera de traducci&oacute;n de modo-texto + (<literal>'t'</literal>) la cual traducir&aacute; + transparentemente <literal>\n</literal> a + <literal>\r\n</literal> cuando trabaje con el archivo. En + contraste, tambi&eacute;n puede usar <literal>'b'</literal> para + forzar el modo binario, el cual no traduce sus datos. Para usar + &eacute;stas banderas, indique <literal>'b'</literal> o + <literal>'t'</literal> como el &uacute;ltimo caracter del + par&aacute;metro <parameter>modo</parameter>. + </para> + <para> + El modo de traducci&oacute;n predeterminado depende de la SAPI y + la versi&oacute;n de PHP que usa, as&iacute; que es recomendable + especificar siempre la bandera apropiada por razones de + portabilidad. Deber&iacute;a usar el modo <literal>'t'</literal> + si trabaja con archivos de texto-plano y usa + <literal>\n</literal> para delimitar los finales de l&iacute;nea + en su script, pero espera que sus archivos sean legibles en + aplicaciones como el bloc de notas. Deber&iacute;a usar el modo + <literal>'b'</literal> en todos los dem&aacute;s casos. + </para> + <para> + Si no especifica la bandera 'b' cuando trabaja con archivos + binarios, puede experimentar problemas con sus datos, incluyendo + archivos de im&aacute;gen corruptos y problemas extra&ntilde;os + con los caracteres <literal>\r\n</literal>. + </para> + <para> + + <emphasis> + Por razones de portabilidad, es bastante recomendable que + siempre usa la bandera 'b' cuando abre archivos con + <function>fopen</function>. + </emphasis> + </para> + <para> + + <emphasis> + De nuevo, por razones de portabilidad, es asimismo muy + recomendable que re-escriba el c&oacute;digo que use o dependa + del modo <literal>'t'</literal> para que use los finales de + l&iacute;nea correctos y el modo <literal>'b'</literal> en su + lugar. + </emphasis> + </para> + <para> + + <emphasis> + A partir de PHP 4.3.2, el modo predeterminado es definir + binario para todas las plataformas que distinguen entre modos + binario y de texto. Si tiene problemas con sus scripts + despu&eacute;s de actualizarse, intente usar la bandera + <literal>'t'</literal> como una soluci&oacute;n temporal hasta + que haya hecho su script m&aacute;s portable como se menciona + m&aacute;s arriba. + </emphasis> + </para> + </note> <para> - Puede usarse el tercer par&aacute;metro opcional y fijarlo a "1", si - tambi&eacute;n se quiere buscar el fichero en el <link - linkend="ini.include-path">include_path</link>. + El tercer par&aacute;metro, opcional, + <parameter>usar_ruta_inclusion</parameter> puede definirse como + '1' o &true; si desea buscar por el archivo en <link + linkend="ini.include-path">include_path</link>, tambi&eacute;n. </para> + <simpara> + Si la apertura falla, la funci&oacute;n devuelve &false; y se + genera un error de nivel <constant>E_WARNING</constant>. Es + posible usar <link + linkend="language.operators.errorcontrol">@</link> para suprimir + tal advertencia. + </simpara> <para> <example> - <title>Ejemplo de <function>fopen()</function></title> + <title>Ejemplos de <function>fopen</function></title> <programlisting role="php"> -$fp = fopen("/home/rasmus/file.txt", "r"); -$fp = fopen("http://www.php.net/", "r"); -$fp = fopen("ftp://user:password@example.com/", "w"); +<![CDATA[ +<?php +$gestor = fopen("/home/rasmus/archivo.txt", "r"); +$gestor = fopen("/home/rasmus/archivo.gif", "wb"); +$gestor = fopen("http://www.example.com/", "r"); +$gestor = fopen("ftp://usuario:contrasenya@example.com/un_archivo.txt", "w"); +?> +]]> </programlisting> </example> </para> <simpara> - Si experimentas problemas a la hora de leer y escribir a - ficheros y estas usando la version de PHP como m&oacute;dulo para el - servidor, recuerda que debes asegurar que los ficheros y directorios - que estas usando son accesibles al proceso servidor. + Si experimenta problemas con la lectura y escritura sobre + archivos, y est&aacute; usando la versi&oacute;n tipo + m&oacute;dulo de servidor de PHP, recuerde asegurarse de que los + archivos y directorios que est&aacute; usando sean asequibles + para el proceso del servidor. </simpara> <para> - En la plataforma Windows, ten cuidado de escribir correctamente - las barras invertidas en el path del fichero (poni&eacute;ndolas dobles), - o usa barras directas. + En la plataforma Windows, tenga cuidado de escapar cualquier + barra invertida usada en la ruta al arcivo, o use barras hace + adelante. <informalexample> <programlisting role="php"> -$fp = fopen("c:\\data\\info.txt", "r"); +<![CDATA[ +<?php +$gestor = fopen("c:\\datos\\info.txt", "r"); +?> +]]> </programlisting> </informalexample> </para> + &warn.ssl-non-standard; + &note.sm.uidcheck.dir; <simpara> - Ver tambi&eacute;n <function>fclose</function>, - <function>fsockopen</function>, y <function>popen</function>. + Vea tambi&eacute;n <xref linkend="wrappers"/>, + <function>fclose</function>, <function>fgets</function>, + <function>fread</function>, <function>fwrite</function>, + <function>fsockopen</function>, <function>file</function>, + <function>file_exists</function>, + <function>is_readable</function>, + <function>stream_set_timeout</function>, y + <function>popen</function>. </simpara> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc-es/reference/ftp/functions/ftp-exec.xml?r1=1.2&r2=1.3&ty=u Index: phpdoc-es/reference/ftp/functions/ftp-exec.xml diff -u phpdoc-es/reference/ftp/functions/ftp-exec.xml:1.2 phpdoc-es/reference/ftp/functions/ftp-exec.xml:1.3 --- phpdoc-es/reference/ftp/functions/ftp-exec.xml:1.2 Mon Dec 15 23:43:28 2003 +++ phpdoc-es/reference/ftp/functions/ftp-exec.xml Mon Jun 21 22:07:36 2004 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.2 $ --> -<!-- EN-Revision: 1.9 Maintainer: lboshell Status: ready --> +<!-- $Revision: 1.3 $ --> +<!-- EN-Revision: 1.10 Maintainer: lboshell Status: ready --> <!-- splitted from ./en/functions/ftp.xml, last change in rev 1.32 --> <refentry id='function.ftp-exec'> <refnamediv> @@ -16,11 +16,11 @@ <methodparam><type>string</type><parameter>comando</parameter></methodparam> </methodsynopsis> <para> -Env&iacute;a una petici&oacute;n SITE -EXEC <parameter>comando</parameter> al servidor FTP. Devuelve &true; -si el comando tuvo &eacute;xito (el servidor env&iacute;a el -c&oacute;digo de respuesta: <literal>200</literal>); o &false; de lo -contrario. + Env&iacute;a una petici&oacute;n SITE EXEC + <parameter>comando</parameter> al servidor FTP. Devuelve &true; + si el comando tuvo &eacute;xito (el servidor env&iacute;a el + c&oacute;digo de respuesta: <literal>200</literal>); o &false; de + lo contrario. </para> <para> <example> @@ -35,9 +35,8 @@ $resultado_login = ftp_login($id_con, $nombre_usuario_ftp, $contrasenya_usuario_ftp); -if ($res = ftp_exec($id_con, $comando)) { +if (ftp_exec($id_con, $comando)) { echo "$comando fue ejecutado satisfactoriamente<br />\n"; - echo nl2br($res); } else { echo 'no se pudo ejecutar ' . $comando; } http://cvs.php.net/diff.php/phpdoc-es/reference/image/functions/imagegif.xml?r1=1.3&r2=1.4&ty=u Index: phpdoc-es/reference/image/functions/imagegif.xml diff -u phpdoc-es/reference/image/functions/imagegif.xml:1.3 phpdoc-es/reference/image/functions/imagegif.xml:1.4 --- phpdoc-es/reference/image/functions/imagegif.xml:1.3 Thu May 13 14:41:55 2004 +++ phpdoc-es/reference/image/functions/imagegif.xml Mon Jun 21 22:07:36 2004 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.3 $ --> -<!-- EN-Revision: 1.8 Maintainer: lboshell Status: ready --> +<!-- $Revision: 1.4 $ --> +<!-- EN-Revision: 1.9 Maintainer: lboshell Status: ready --> <!-- splitted from ./en/functions/image.xml, last change in rev 1.3 --> <refentry id="function.imagegif"> <refnamediv> @@ -11,7 +11,7 @@ <refsect1> <title>Descripci&oacute;n</title> <methodsynopsis> - <type>int</type><methodname>imagegif</methodname> + <type>bool</type><methodname>imagegif</methodname> <methodparam><type>resource</type><parameter>imagen</parameter></methodparam> <methodparam choice="opt"><type>string</type><parameter>nombre_archivo</parameter></methodparam> </methodsynopsis> http://cvs.php.net/diff.php/phpdoc-es/reference/info/functions/ini-set.xml?r1=1.7&r2=1.8&ty=u Index: phpdoc-es/reference/info/functions/ini-set.xml diff -u phpdoc-es/reference/info/functions/ini-set.xml:1.7 phpdoc-es/reference/info/functions/ini-set.xml:1.8 --- phpdoc-es/reference/info/functions/ini-set.xml:1.7 Thu Jun 3 03:21:41 2004 +++ phpdoc-es/reference/info/functions/ini-set.xml Mon Jun 21 22:07:36 2004 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.7 $ --> -<!-- EN-Revision: 1.37 Maintainer: lboshell Status: ready --> +<!-- $Revision: 1.8 $ --> +<!-- EN-Revision: 1.38 Maintainer: lboshell Status: ready --> <!-- splitted from ./en/functions/info.xml, last change in rev 1.23 --> <refentry id="function.ini-set"> <refnamediv> @@ -1054,7 +1054,7 @@ <row> <entry>safe_mode</entry> <entry>"0"</entry> - <entry>&php.ini; only</entry> + <entry>PHP_INI_SYSTEM</entry> </row> <row> <entry>safe_mode_allowed_env_vars</entry> http://cvs.php.net/co.php/phpdoc-es/reference/domxml/functions/DomNode-owner-document.xml?r=1.1&p=1 Index: phpdoc-es/reference/domxml/functions/DomNode-owner-document.xml +++ phpdoc-es/reference/domxml/functions/DomNode-owner-document.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.4 Maintainer: lboshell Status: ready --> <!-- splitted from ./en/functions/domxml.xml, last change in rev 1.38 --> <refentry id='function.domnode-owner-document'> <refnamediv> <refname>DomNode->owner_document</refname> <refpurpose> Devuelve el documento al que este nodo pertenece </refpurpose> </refnamediv> <refsect1> <title>Descripci&oacute;n</title> <methodsynopsis> <type>object</type><methodname>DomNode->owner_document</methodname> <void/> </methodsynopsis> <para> Esta funci&oacute;n devuelve el documento al que pertenece el nodo actual. </para> <para> El siguiente ejemplo crear&aacute; dos listas id&eacute;nticas de hijos. <example> <title>Encontrar el documento de un nodo</title> <programlisting role="php"> <![CDATA[ <?php $doc = domxml_new_doc("1.0"); $nodo = $doc->create_element("para"); $nodo = $doc->append_child($nodo); $hijos = $doc->children(); print_r($hijos); $doc2 = $nodo->owner_document(); $hijos = $doc2->children(); print_r($hijos); ?> ]]> </programlisting> </example> </para> <para> Vea tambi&eacute;n <function>domnode_insert_before</function>. </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/phpdoc-es/reference/domxml/functions/DomNode-parent-node.xml?r=1.1&p=1 Index: phpdoc-es/reference/domxml/functions/DomNode-parent-node.xml +++ phpdoc-es/reference/domxml/functions/DomNode-parent-node.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.4 Maintainer: lboshell Status: ready --> <!-- splitted from ./en/functions/domxml.xml, last change in rev 1.38 --> <refentry id='function.domnode-parent-node'> <refnamediv> <refname>DomNode->parent_node</refname> <refpurpose> Devuelve el padre del nodo </refpurpose> </refnamediv> <refsect1> <title>Descripci&oacute;n</title> <methodsynopsis> <type>object</type><methodname>DomNode->parent_node</methodname> <void/> </methodsynopsis> <para> Esta funci&oacute;n devuelve el nodo padre. </para> <para> (S&oacute;lo PHP &gt;= 4.3) Si no se encuentra un padre, se devuelve NULL. </para> <para> El siguiente ejemplo mostrar&aacute; dos listas id&eacute;nticas de hijos. <example> <title>Encontrar el documento de un nodo</title> <programlisting role="php"> <![CDATA[ <?php $doc = domxml_new_doc("1.0"); $nodo = $doc->create_element("para"); $nodo = $doc->append_child($nodo); $hijos = $doc->children(); print_r($hijos); $doc2 = $nodo->parent_node(); $hijos = $doc2->children(); print_r($hijos); ?> ]]> </programlisting> </example> </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/phpdoc-es/reference/domxml/functions/DomNode-prefix.xml?r=1.1&p=1 Index: phpdoc-es/reference/domxml/functions/DomNode-prefix.xml +++ phpdoc-es/reference/domxml/functions/DomNode-prefix.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.3 Maintainer: lboshell Status: ready --> <!-- splitted from ./en/functions/domxml.xml, last change in rev 1.39 --> <refentry id='function.domnode-prefix'> <refnamediv> <refname>DomNode->prefix</refname> <refpurpose> Devuelve el prefijo de espacio de nombres del nodo </refpurpose> </refnamediv> <refsect1> <title>Descripci&oacute;n</title> <methodsynopsis> <type>string</type><methodname>DomNode->prefix</methodname> <void/> </methodsynopsis> <para> Devuelve el prefijo de espacio de nombres del nodo. </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/phpdoc-es/reference/domxml/functions/DomNode-previous-sibling.xml?r=1.1&p=1 Index: phpdoc-es/reference/domxml/functions/DomNode-previous-sibling.xml +++ phpdoc-es/reference/domxml/functions/DomNode-previous-sibling.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.6 Maintainer: lboshell Status: ready --> <!-- splitted from ./en/functions/domxml.xml, last change in rev 1.38 --> <refentry id='function.domnode-previous-sibling'> <refnamediv> <refname>DomNode->previous_sibling</refname> <refpurpose> Devuelve el hermano anterior del nodo </refpurpose> </refnamediv> <refsect1> <title>Descripci&oacute;n</title> <methodsynopsis> <type>object</type><methodname>DomNode->previous_sibling</methodname> <void/> </methodsynopsis> <para> Esta funci&oacute;n devuelve el hermano anterior del nodo actual. Si no hay un hermano anterior, devuelve &false; (&lt; 4.3) o &null; (&gt;= 4.3). Es posible usar esta funci&oacute;n para iterar a trav&eacute;s de los hijos de un nodo, como se muestra en el ejemplo. </para> <para> Vea tambi&eacute;n <function>domnode_next_sibling</function>. </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/phpdoc-es/reference/domxml/functions/DomNode-remove-child.xml?r=1.1&p=1 Index: phpdoc-es/reference/domxml/functions/DomNode-remove-child.xml +++ phpdoc-es/reference/domxml/functions/DomNode-remove-child.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.5 Maintainer: lboshell Status: ready --> <!-- splitted from ./en/functions/domxml.xml, last change in rev 1.38 --> <refentry id='function.domnode-remove-child'> <refnamediv> <refname>DomNode->remove_child</refname> <refpurpose> Elimina un hijo de una lista de hijos </refpurpose> </refnamediv> <refsect1> <title>Descripci&oacute;n</title> <methodsynopsis> <type>object</type><methodname>DomNode->remove_child</methodname> <methodparam><type>object</type><parameter>hijo_antiguo</parameter></methodparam> </methodsynopsis> <para> Esta funci&oacute;n elimina un hijo de una lista de hijos. Si el hijo no puede ser eliminado, o no es un hijo, la funci&oacute;n devuelve &false;. Si el hijo puede ser eliminado, la funci&oacute;n devuelve el hijo antiguo. </para> <para> <example> <title>Eliminar un hijo</title> <programlisting role="php"> <![CDATA[ <?php include("ejemplo.inc"); if (!$dom = domxml_open_mem($cadena_xml)) { echo "Ocurri&oacute; un error al analizar el documento\n"; exit; } $elementos = $dom->get_elements_by_tagname("tbody"); $elemento = $elementos[0]; $hijos = $elemento->child_nodes(); $hijo = $elemento->remove_child($hijos[0]); echo "<PRE>"; $archivo_xml = $dom->dump_mem(true); echo htmlentities($archivo_xml); echo "</PRE>"; ?> ]]> </programlisting> </example> </para> <para> Vea tambi&eacute;n <function>domnode_append_child</function>. </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/phpdoc-es/reference/domxml/functions/DomNode-replace-child.xml?r=1.1&p=1 Index: phpdoc-es/reference/domxml/functions/DomNode-replace-child.xml +++ phpdoc-es/reference/domxml/functions/DomNode-replace-child.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.7 Maintainer: lboshell Status: ready --> <refentry id='function.domnode-replace-child'> <refnamediv> <refname>DomNode->replace_child</refname> <refpurpose> Reemplaza un hijo </refpurpose> </refnamediv> <refsect1> <title>Descripci&oacute;n</title> <methodsynopsis> <type>object</type><methodname>DomNode->replace_child</methodname> <methodparam><type>object</type><parameter>nodo_antiguo</parameter></methodparam> <methodparam><type>object</type><parameter>nodo_nuevo</parameter></methodparam> </methodsynopsis> <para> (PHP 4.2) Esta funci&oacute;n reemplaza el hijo <parameter>nodo_antiguo</parameter> con el nuevo nodo pasado. Si el nuevo nodo ya es un hijo, no ser&aacute; agregado una segunda vez. Si el nodo antiguo no puede encontrarse, la funci&oacute;n devuelve &false;. Si el reemplazo tiene &eacute;xito, se devuelve el nodo antiguo. </para> <para> (PHP 4.3) Esta funci&oacute;n reemplaza el hijo <parameter>nodo_antiguo</parameter> con el <parameter>nodo_nuevo</parameter> pasado, incluso si el nuevo nodo ya es un hijo del DomNode. Si <parameter>nodo_nuevo</parameter> ya hab&iacute;a sido insertado en el documento, primero es desenlazado de su contexto actual. Si el nodo antiguo no puede ser encontrado, la funci&oacute;n devuelve &false;. Si el reemplazo tiene &eacute;xito, se devuelve el nodo antiguo. (Este comportamiento sigue las especificaciones del W3C). </para> <para> Vea tambi&eacute;n <function>domnode_append_child</function> </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/phpdoc-es/reference/domxml/functions/DomNode-replace-node.xml?r=1.1&p=1 Index: phpdoc-es/reference/domxml/functions/DomNode-replace-node.xml +++ phpdoc-es/reference/domxml/functions/DomNode-replace-node.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.10 Maintainer: lboshell Status: ready --> <!-- splitted from ./en/functions/domxml.xml, last change in rev 1.39 --> <refentry id='function.domnode-replace-node'> <refnamediv> <refname>DomNode->replace_node</refname> <refpurpose> Reemplaza el nodo </refpurpose> </refnamediv> <refsect1> <title>Descripci&oacute;n</title> <methodsynopsis> <type>object</type><methodname>DomNode->replace_node</methodname> <methodparam><type>object</type><parameter>nodo_nuevo</parameter></methodparam> </methodsynopsis> <para> (PHP 4.2) Esta funci&oacute;n reemplaza un nodo existente con el nuevo nodo pasado. Antes del reemplazo, <parameter>nodo_nuevo</parameter> es copiado si tiene un padre, para asegurarse de que un nodo que ya est&eacute; en el documento no sea insertado una segunda vez. Este comportamiento obliga a hacer todas las modificaciones en el nodo antes del reemplazo, o retomar el nodo insertado despu&eacute;s con funciones como <function>domnode_first_child</function>, <function>domnode_child_nodes</function> etc.. </para> <para> (PHP 4.3) Esta funci&oacute;n reemplaza un nodo existente con el nuevo nodo pasado. No sigue siendo copiado. Si <parameter>nodo_nuevo</parameter> ya hab&iacute;a sido insertado en el documento, es primero despojado del enlace con su contexto actual. Si el reemplazo tiene &eacute;xito, se devuelve el nodo antiguo. </para> <para> Vea tambi&eacute;n <function>domnode_append_child</function> </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/phpdoc-es/reference/domxml/functions/DomNode-set-content.xml?r=1.1&p=1 Index: phpdoc-es/reference/domxml/functions/DomNode-set-content.xml +++ phpdoc-es/reference/domxml/functions/DomNode-set-content.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.3 Maintainer: lboshell Status: ready --> <!-- splitted from ./en/functions/domxml.xml, last change in rev 1.39 --> <refentry id='function.domnode-set-content'> <refnamediv> <refname>DomNode->set_content</refname> <refpurpose> Define el contenido del nodo </refpurpose> </refnamediv> <refsect1> <title>Descripci&oacute;n</title> <methodsynopsis> <type>bool</type><methodname>DomNode->set_content</methodname> <void/> </methodsynopsis> <para> &warn.undocumented.func; </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/phpdoc-es/reference/domxml/functions/DomNode-set-name.xml?r=1.1&p=1 Index: phpdoc-es/reference/domxml/functions/DomNode-set-name.xml +++ phpdoc-es/reference/domxml/functions/DomNode-set-name.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.4 Maintainer: lboshell Status: ready --> <!-- splitted from ./en/functions/domxml.xml, last change in rev 1.39 --> <refentry id='function.domnode-set-name'> <refnamediv> <refname>DomNode->set_name</refname> <refpurpose> Define el nombre del nodo </refpurpose> </refnamediv> <refsect1> <title>Descripci&oacute;n</title> <methodsynopsis> <type>bool</type><methodname>DomNode->set_name</methodname> <void/> </methodsynopsis> <para> Define el nombre del nodo. </para> <para> Vea tambi&eacute;n <function>domnode_node_name</function>. </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/phpdoc-es/reference/domxml/functions/DomNode-set-namespace.xml?r=1.1&p=1 Index: phpdoc-es/reference/domxml/functions/DomNode-set-namespace.xml +++ phpdoc-es/reference/domxml/functions/DomNode-set-namespace.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.4 Maintainer: lboshell Status: ready --> <!-- splitted from ./en/functions/domxml.xml, last change in rev 1.38 --> <refentry id='function.domnode-set-namespace'> <refnamediv> <refname>DomNode->set_namespace</refname> <refpurpose> Define el espacio de nombres de un nodo. </refpurpose> </refnamediv> <refsect1> <title>Descripci&oacute;n</title> <methodsynopsis> <type>void</type><methodname>DomNode->set_namespace</methodname> <methodparam><type>string</type><parameter>uri</parameter></methodparam> <methodparam choice="opt"><type>string</type><parameter>prefijo</parameter></methodparam> </methodsynopsis> <para> Define el espacio de nombres de un nodo a <parameter>uri</parameter>. Si ya existe una declaraci&oacute;n de espacio de nombres con el mismo uri en uno de los nodos padres del nodo, tal prefijo ser&aacute; tomado, de lo contrario tomar&aacute; aqu&eacute;l indicado en el par&aacute;metro opcional <parameter>prefijo</parameter> o generar&aacute; uno aleatorio. </para> <para> Vea tambi&eacute;n <function>domdocument_create_element_ns</function>, y <function>domnode_add_namespace</function> </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/phpdoc-es/reference/domxml/functions/DomNode-unlink-node.xml?r=1.1&p=1 Index: phpdoc-es/reference/domxml/functions/DomNode-unlink-node.xml +++ phpdoc-es/reference/domxml/functions/DomNode-unlink-node.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.3 Maintainer: lboshell Status: ready --> <!-- splitted from ./en/functions/domxml.xml, last change in rev 1.39 --> <refentry id='function.domnode-unlink-node'> <refnamediv> <refname>DomNode->unlink_node</refname> <refpurpose> Elimina el nodo </refpurpose> </refnamediv> <refsect1> <title>Descripci&oacute;n</title> <methodsynopsis> <type>object</type><methodname>DomNode->unlink_node</methodname> <void/> </methodsynopsis> <para> &warn.undocumented.func; </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/phpdoc-es/reference/domxml/functions/DomProcessingInstruction-data.xml?r=1.1&p=1 Index: phpdoc-es/reference/domxml/functions/DomProcessingInstruction-data.xml +++ phpdoc-es/reference/domxml/functions/DomProcessingInstruction-data.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.3 Maintainer: lboshell Status: ready --> <!-- splitted from ./en/functions/domxml.xml, last change in rev 1.38 --> <refentry id='function.domprocessinginstruction-data'> <refnamediv> <refname>DomProcessingInstruction->data</refname> <refpurpose> Devuelve los datos de un nodo pi </refpurpose> </refnamediv> <refsect1> <title>Descripci&oacute;n</title> <methodsynopsis> <type>string</type><methodname>DomProcessingInstruction->data</methodname> <void/> </methodsynopsis> <para> &warn.undocumented.func; </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/phpdoc-es/reference/domxml/functions/DomProcessingInstruction-target.xml?r=1.1&p=1 Index: phpdoc-es/reference/domxml/functions/DomProcessingInstruction-target.xml +++ phpdoc-es/reference/domxml/functions/DomProcessingInstruction-target.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.3 Maintainer: lboshell Status: ready --> <!-- splitted from ./en/functions/domxml.xml, last change in rev 1.38 --> <refentry id='function.domprocessinginstruction-target'> <refnamediv> <refname>DomProcessingInstruction->target</refname> <refpurpose> Devuelve el destino de un nodo pi </refpurpose> </refnamediv> <refsect1> <title>Descripci&oacute;n</title> <methodsynopsis> <type>string</type><methodname>DomProcessingInstruction->target</methodname> <void/> </methodsynopsis> <para> &warn.undocumented.func; </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 -->
« previous php.doc.es (#627) next »