cvs: phpdoc-it /reference/filesystem/functions copy.xml feof.xml fgetcsv.xml file-get-contents.xml flock.xml fopen.xml fscanf.xml fseek.xml fwrite.xml
pathinfo.xml tempnam.xml tmpfile.xml touch.xml /reference/ftp/functions ftp-pasv.xml ftp-put.xml ftp-pwd.xml ftp-quit.xml ftp-rawlist.xml
ftp-rename.xml ftp-rmdir.xml
| From: | Andrioli Darvin | Date: | Tue, 21 Dec 2004 13:21:59 +0000 |
| Subject: | cvs: phpdoc-it /reference/filesystem/functions copy.xml feof.xml fgetcsv.xml file-get-contents.xml flock.xml fopen.xml fscanf.xml fseek.xml fwrite.xml pathinfo.xml tempnam.xml tmpfile.xml touch.xml /reference/ftp/functions ftp-pasv.xml ftp-put.xml ftp-pwd.xml ftp-quit.xml ftp-rawlist.xml ftp-rename.xml ftp-rmdir.xml |
||
| Groups: | php.doc.it | ||
| Request: | Send a blank email to doc-it+get-678@lists.php.net to get a copy of this message | ||
darvina Tue Dec 21 08:21:59 2004 EDT
Modified files:
/phpdoc-it/reference/filesystem/functions copy.xml feof.xml
fgetcsv.xml
file-get-contents.xml
flock.xml fopen.xml
fscanf.xml fseek.xml
fwrite.xml pathinfo.xml
tempnam.xml tmpfile.xml
touch.xml
/phpdoc-it/reference/ftp/functions ftp-pasv.xml ftp-put.xml
ftp-pwd.xml ftp-quit.xml
ftp-rawlist.xml ftp-rename.xml
ftp-rmdir.xml
Log:
Translation update by Fernando and Afparam
http://cvs.php.net/diff.php/phpdoc-it/reference/filesystem/functions/copy.xml?r1=1.8&r2=1.9&ty=u Index: phpdoc-it/reference/filesystem/functions/copy.xml diff -u phpdoc-it/reference/filesystem/functions/copy.xml:1.8 phpdoc-it/reference/filesystem/functions/copy.xml:1.9 --- phpdoc-it/reference/filesystem/functions/copy.xml:1.8 Thu Sep 16 08:20:33 2004 +++ phpdoc-it/reference/filesystem/functions/copy.xml Tue Dec 21 08:21:58 2004 @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="iso-8859-1"?> +<?xml version="1.2" encoding="iso-8859-1"?> <!-- EN-Revision: 1.10 Maintainer: fernando Status: ready --> <!-- CREDITS: cortesi --> <!-- splitted from ./it/functions/filesystem.xml, last change in rev 1.15 --> @@ -25,7 +25,10 @@ $file = 'example.txt'; $newfile = 'example.txt.bak'; -if (!copy($file, $newfile)) { +$file = 'example.txt'; +$newfile = 'example.txt.bak'; + + if (!copy($file, $newfile)) { echo "Copia di $file non riuscita ...\n"; } ?> @@ -49,9 +52,9 @@ </warning> <note> <para> - Windows Compatability Note: If you copy a file with no size, - <function>copy</function> will return false, but the file will be correctly - copied. + Nota di compatibilità con Windows: se viene copiato un file vuoto, + <function>copy</function> restituisce falso, ma il file sarà copiato + correttamente. </para> </note> <para> http://cvs.php.net/diff.php/phpdoc-it/reference/filesystem/functions/feof.xml?r1=1.6&r2=1.7&ty=u Index: phpdoc-it/reference/filesystem/functions/feof.xml diff -u phpdoc-it/reference/filesystem/functions/feof.xml:1.6 phpdoc-it/reference/filesystem/functions/feof.xml:1.7 --- phpdoc-it/reference/filesystem/functions/feof.xml:1.6 Thu Sep 16 08:20:33 2004 +++ phpdoc-it/reference/filesystem/functions/feof.xml Tue Dec 21 08:21:58 2004 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- EN-Revision: 1.8 Maintainer: fernando Status: working --> +<!-- EN-Revision: 1.9 Maintainer: fernando Status: working --> <!-- CREDITS: cortesi --> <refentry id="function.feof"> <refnamediv> @@ -18,11 +18,11 @@ </para> <warning> <simpara> - La funzione <function>feof</function> restituirà &true; soltanto se la connessione aperta da - <function>fsockopen</function> è chiusa. Ciò può portare in timeout lo - lo script. Un trucco per evitare ciò consiste nell'utilizzare la funzione - <function>stream_set_timeout</function>, in modo da costringere - <function>feof</function> che restituirà &false; in caso di timeout. + Se una connessione aperta da <function>fsockopen</function> non è stata chiusa + dal server, <function>feof</function> attenderà finchè un timeout + non sia stato raggiunto e restituisce &true;. Il valore di timeout di default è + 60 secondi. Si può usare <function>stream_set_timeout</function> per cambiare questo + valore. </simpara> </warning> &fs.validfp.all; http://cvs.php.net/diff.php/phpdoc-it/reference/filesystem/functions/fgetcsv.xml?r1=1.8&r2=1.9&ty=u Index: phpdoc-it/reference/filesystem/functions/fgetcsv.xml diff -u phpdoc-it/reference/filesystem/functions/fgetcsv.xml:1.8 phpdoc-it/reference/filesystem/functions/fgetcsv.xml:1.9 --- phpdoc-it/reference/filesystem/functions/fgetcsv.xml:1.8 Thu Sep 16 08:20:34 2004 +++ phpdoc-it/reference/filesystem/functions/fgetcsv.xml Tue Dec 21 08:21:58 2004 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- EN-Revision: 1.10 Maintainer: fernando Status: working --> +<!-- EN-Revision: 1.16 Maintainer: fernando Status: working --> <!-- CREDITS: cortesi --> <!-- splitted from ./it/functions/filesystem.xml, last change in rev 1.2 --> <refentry id="function.fgetcsv"> @@ -12,20 +12,53 @@ <methodsynopsis> <type>array</type><methodname>fgetcsv</methodname> <methodparam><type>resource</type><parameter>handle</parameter></methodparam> - <methodparam><type>int</type><parameter>lunghezza</parameter></methodparam> + <methodparam choice="opt"><type>int</type><parameter>lunghezza</parameter></methodparam> <methodparam choice="opt"><type>string</type><parameter>delimitatore</parameter></methodparam> <methodparam choice="opt"><type>string</type><parameter>enclosure</parameter></methodparam> </methodsynopsis> - <simpara> + + <para> + <variablelist> + <varlistentry> + <term><parameter>handle</parameter></term> + <listitem> + <simpara> + Un puntatore valido a un file che punta a un file aperto con successo da <function>fopen</function>, + <function>popen</function>, o <function>fsockopen</function>. + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>length</parameter> (Opzionale)</term> + <listitem> + <simpara> + Deve essere più grande della linea più lunga (in caratteri) per essere trovato nel file CSV + (permettendo di trascinare il carattere di fine linea). E' diventato opzionale in PHP 5. + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>delimiter</parameter> (Opzionale)</term> + <listitem> + <simpara> + Setta il delimitatore di campo (un solo carattere). Virgola per default. + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>enclosure</parameter> (Opzionale)</term> + <listitem> + <simpara> + Setta il carattere di inclusione nel campo (un solo carattere). Doppie virgolette per default. Aggiunto in PHP 4.3.0. + </simpara> + </listitem> + </varlistentry> + </variablelist> + </para> <simpara> Simile a <function>fgets</function> eccetto per il fatto che <function>fgetcsv</function> analizza le righe lette alla ricerca di campi in formato <acronym>CSV</acronym> e restituisce un vettore contenente - i campi letti. Il delimitatore di campo è una virgola, a meno che non - venga specificato un altro delimitatore usando il terzo parametro opzionale, - mentre per il quarto parametro opzionale, <parameter>enclosure</parameter>, - il default sono i doppi apici. Entrambi i parametri, <parameter>delimitatore</parameter> - ed <parameter>enclosure</parameter>, hanno la dimensione di un carattere. - Se si forniscono stringhe di più di un carattere, verrà considerato solo il primo. + i campi letti. </simpara> <note> <simpara> @@ -63,7 +96,7 @@ $handle = fopen("test.csv","r"); while (($data = fgetcsv($handle, 1000, ",")) !== FALSE) { $num = count($data); - echo "<p> $num campi sulla linea $row: <br >\n"; + echo "<p> $num campi sulla linea $row: <br /></p>\n"; $row++; for ($c=0; $c < $num; $c++) { echo $data[$c] . "<br>\n"; @@ -76,8 +109,12 @@ </example> </para> <para> - Vedere anche <function>explode</function>, <function>file</function> e - <function>pack</function>. + <function>fgetcsv</function> è diventata binary safe dal PHP 4.3.5 + </para> + ¬e.line-endings; + <para> + Vedere anche <function>explode</function>, <function>file</function>, + <function>pack</function> e <function>fputcsv</function>. </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc-it/reference/filesystem/functions/file-get-contents.xml?r1=1.5&r2=1.6&ty=u Index: phpdoc-it/reference/filesystem/functions/file-get-contents.xml diff -u phpdoc-it/reference/filesystem/functions/file-get-contents.xml:1.5 phpdoc-it/reference/filesystem/functions/file-get-contents.xml:1.6 --- phpdoc-it/reference/filesystem/functions/file-get-contents.xml:1.5 Thu Aug 12 09:55:09 2004 +++ phpdoc-it/reference/filesystem/functions/file-get-contents.xml Tue Dec 21 08:21:58 2004 @@ -1,8 +1,8 @@ <?xml version="1.0" encoding="iso-8859-1"?> <!-- splitted from ./it/functions/filesystem.xml, last change in rev 1.15 --> <!-- last change to 'file-get-contents' in en/ tree in rev 1.130 --> -<!-- EN-Revision: 1.16 Maintainer: cortesi Status: working --> -<!-- OLD-Revision: 1.134/EN.1.130 --> +<!-- EN-Revision: 1.21 Maintainer: fernando Status: working --> +<!-- CREDITS: cortesi --> <refentry id="function.file-get-contents"> <refnamediv> <refname>file_get_contents</refname> @@ -15,42 +15,34 @@ <methodparam><type>string</type><parameter>filename</parameter></methodparam> <methodparam choice="opt"><type>bool</type><parameter>use_include_path</parameter></methodparam> <methodparam choice="opt"><type>resource</type><parameter>context</parameter></methodparam> + <methodparam choice="opt"><type>int</type><parameter>offset</parameter></methodparam> </methodsynopsis> <para> Simile alla funzione <function>file</function>, tranne che - <function>file_get_contents</function> restituisce il file in una stringa. + <function>file_get_contents</function> restituisce il file in una stringa, + iniziando allo specificato <parameter>offset</parameter>. Se si verifica un errore <function>file_get_contents</function> restituirà &false; </para> - <para> - La funzione <function>file_get_contents</function> è la via preferenziale - per leggere il contenuto di un file in una stringa. La funzione - utilizza tecniche di mappatura della memoria, se sono supportate dal sistema operativo, - per ottimizzare le prestazioni. - </para> - <example> - <title>Utilizzo di <function>file_get_contents</function> con un URI</title> + <note> + <simpara> + Il parametro<parameter>offset</parameter> è stato aggiunto nel PHP 5.1.0. + </simpara> + </note> + <note> <para> - Se si deve aprire un URI con caratteri speciali, tipo spazi, occorre codificare - l'URI con <function>urlencode</function>. + Se si sta aprendo un URI con caratteri speciali, spazi ad esempio, + si ha bisogno di decodificare l' URI con <function>urlencode</function>. </para> - <programlisting role="php"> -<![CDATA[ -<?php -$url = "http://foobar.com/with funny chars"; -list($protocol, $uri) = split("//", $url); -$html = file_get_contents($proto . "//" . urlencode($uri)); -?> -]]> - </programlisting> - </example> + </note> ¬e.bin-safe; &tip.fopen-wrapper; ¬e.context-support; &warn.ssl-non-standard; <simpara> - Vedere anche: <function>fgets</function>, <function>file</function>, - <function>fread</function>, <function>include</function> - e <function>readfile</function>. + Vedere anche <function>fgets</function>, <function>file</function>, + <function>fread</function>, <function>include</function>, + <function>readfile</function> &listendand; + <function>file_put_contents</function>. </simpara> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc-it/reference/filesystem/functions/flock.xml?r1=1.5&r2=1.6&ty=u Index: phpdoc-it/reference/filesystem/functions/flock.xml diff -u phpdoc-it/reference/filesystem/functions/flock.xml:1.5 phpdoc-it/reference/filesystem/functions/flock.xml:1.6 --- phpdoc-it/reference/filesystem/functions/flock.xml:1.5 Thu Sep 16 08:20:34 2004 +++ phpdoc-it/reference/filesystem/functions/flock.xml Tue Dec 21 08:21:58 2004 @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="iso-8859-1"?> <!-- splitted from ./it/functions/filesystem.xml, last change in rev 1.15 --> <!-- last change to 'flock' in en/ tree in rev 1.2 --> -<!-- EN-Revision: 1.9 Maintainer: fernando Status: working --> +<!-- EN-Revision: 1.11 Maintainer: fernando Status: working --> <!-- CREDITS: cortesi --> <!-- OLD-Revision: 1.134/EN.1.2 --> <refentry id="function.flock"> @@ -15,7 +15,7 @@ <type>bool</type><methodname>flock</methodname> <methodparam><type>resource</type><parameter>handle</parameter></methodparam> <methodparam><type>int</type><parameter>operation</parameter></methodparam> - <methodparam choice="opt"><type>int</type><parameter>&wouldblock</parameter></methodparam> + <methodparam choice="opt"><type>int</type><parameter role="reference">wouldblock</parameter></methodparam> </methodsynopsis> <simpara> Il PHP supporta un tecnologia portabile per bloccare file completi in modalità @@ -70,7 +70,8 @@ lettura/scrittura che in teoria può essere usato su qualsiasi piattaforma (inclusi molti sistemi Unix e anche Windows). Il terzo argomento (opzionale) può essere impostato a &true; se la chiave puo bloccare (EWOULDBLOCK - errno condition) + errno condition). Il blocco è realizzato anche da <function>fclose</function> + (che è anche richiamata automaticamente quando lo script termina). </simpara> <simpara> &return.success; http://cvs.php.net/diff.php/phpdoc-it/reference/filesystem/functions/fopen.xml?r1=1.7&r2=1.8&ty=u Index: phpdoc-it/reference/filesystem/functions/fopen.xml diff -u phpdoc-it/reference/filesystem/functions/fopen.xml:1.7 phpdoc-it/reference/filesystem/functions/fopen.xml:1.8 --- phpdoc-it/reference/filesystem/functions/fopen.xml:1.7 Thu Sep 16 08:20:34 2004 +++ phpdoc-it/reference/filesystem/functions/fopen.xml Tue Dec 21 08:21:58 2004 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- EN-Revision: 1.24 Maintainer: fernando Status: working --> +<!-- EN-Revision: 1.25 Maintainer: fernando Status: working --> <!-- CREDITS: cortesi --> <!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 --> <refentry id="function.fopen"> @@ -57,6 +57,15 @@ </simpara> </note> ¬e.context-support; + <note> + <simpara> + Come per PHP 4.3.2, la modalità di default è impostata a binarioper tutte + le piattaforme che distinguono tra modalità binaria e testuale. Se si hanno problemi + con i propri script dopo l'aggiornamento, provare a utilizzare il flag + <literal>'t'</literal> come sostitutivo finchè si ha completato uno + script maggiormente portabile come richiesto sopra. + </simpara> + </note> <para> Il parametro <parameter>mode</parameter> indica il tipo di accesso richiesto per il flusso. Esso può essere: @@ -186,25 +195,20 @@ possono avere situazioni anomale nei dati, tipo immagini corrotte, e situazioni anomale con i caratteri <literal>\r\n</literal>. </para> + </note> + <note> + <para> + Per la portabilità, si consiglia vivamente di usare sempre il flag + 'b' quando si aprono files con <function>fopen</function>. + </para> + </note> + <note> <para> - <emphasis>Per motivi di portabilità è fortemente raccomandato l'uso - del flag 'b' quando si aprono dei file con <function>fopen</function>. - </emphasis> - </para> - <para> - <emphasis>Inoltre, sempre per la portabilità, è anche fortemente raccomandato - di aggiornare il codice che utilizza o che confida nel modalità - <literal>'t'</literal> in modo da utilizzare il corretto terminatore di linea. - </emphasis> - </para> - <para> - <emphasis>A partire dal PHP 4.3.2, per tutte le piattaforme che distinguono tra - tra testo e binario, la modalità di default è la binaria. Se si hanno problemi - negli script dopo l'aggiornamneto, tentare l'utilizzo del flag - <literal>'t'</literal> per tamponare i problemi fino a quando non si - sono resi gli script più portabili come descritto in precedenza. - </emphasis> - </para> + Inoltre, sempre per la portabilità, è anche fortemente raccomandato + di aggiornare il codice che utilizza o che si avvale del mode + <literal>'t'</literal> così da utilizzare il corretto terminatore di linea invece del + <literal>'b'</literal> mode. + </para> </note> <para> Il terzo parametro opzionale <parameter>use_include_path</parameter> http://cvs.php.net/diff.php/phpdoc-it/reference/filesystem/functions/fscanf.xml?r1=1.4&r2=1.5&ty=u Index: phpdoc-it/reference/filesystem/functions/fscanf.xml diff -u phpdoc-it/reference/filesystem/functions/fscanf.xml:1.4 phpdoc-it/reference/filesystem/functions/fscanf.xml:1.5 --- phpdoc-it/reference/filesystem/functions/fscanf.xml:1.4 Thu Aug 12 09:55:09 2004 +++ phpdoc-it/reference/filesystem/functions/fscanf.xml Tue Dec 21 08:21:58 2004 @@ -1,5 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- EN-Revision: 1.15 Maintainer: cortesi Status: working --> +<!-- EN-Revision: 1.16 Maintainer: fernando Status: working --> +<!-- CREDITS: cortesi --> <!-- OLD-Revision: 1.134/EN.1.2 --> <refentry id="function.fscanf"> <refnamediv> @@ -12,8 +13,8 @@ <type>mixed</type><methodname>fscanf</methodname> <methodparam><type>resource</type><parameter>handle</parameter></methodparam> <methodparam><type>string</type><parameter>format</parameter></methodparam> - <methodparam choice="opt"><type>mixed</type><parameter>&...</parameter></methodparam> - </methodsynopsis> + <methodparam choice="opt"><type>mixed</type><parameter role="reference">...</parameter></methodparam> + </methodsynopsis> <para> La funzione <function>fscanf</function> è simile a <function>sscanf</function>, ma prende il proprio input da un file @@ -48,7 +49,7 @@ </programlisting> </example> <example> - <title>Contenuto di users.txt</title> + <title>Cntyennts of users.txt</title> <programlisting role="txt"> <![CDATA[ javier argonaut pe http://cvs.php.net/diff.php/phpdoc-it/reference/filesystem/functions/fseek.xml?r1=1.5&r2=1.6&ty=u Index: phpdoc-it/reference/filesystem/functions/fseek.xml diff -u phpdoc-it/reference/filesystem/functions/fseek.xml:1.5 phpdoc-it/reference/filesystem/functions/fseek.xml:1.6 --- phpdoc-it/reference/filesystem/functions/fseek.xml:1.5 Thu Sep 16 08:20:34 2004 +++ phpdoc-it/reference/filesystem/functions/fseek.xml Tue Dec 21 08:21:58 2004 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> <!-- splitted from ./it/functions/filesystem.xml, last change in rev 1.15 --> -<!-- EN-Revision: 1.8 Maintainer: fernando Status: working --> +<!-- EN-Revision: 1.9 Maintainer: fernando Status: working --> <!-- CREDITS: cortesi --> <refentry id="function.fseek"> <refnamediv> @@ -18,7 +18,7 @@ <para> Imposta l'indicatore di posizione del file riferito da <parameter>handle</parameter>. La nuova posizione, misurata in byte - dall'inizio del file, viene ottenuta aggiungento + dall'inizio del file, si ottiene aggiungendo <parameter>offset</parameter> alla posizione specificata da <parameter>whence</parameter>, i cui valori sono definiti come segue: http://cvs.php.net/diff.php/phpdoc-it/reference/filesystem/functions/fwrite.xml?r1=1.5&r2=1.6&ty=u Index: phpdoc-it/reference/filesystem/functions/fwrite.xml diff -u phpdoc-it/reference/filesystem/functions/fwrite.xml:1.5 phpdoc-it/reference/filesystem/functions/fwrite.xml:1.6 --- phpdoc-it/reference/filesystem/functions/fwrite.xml:1.5 Thu Sep 16 08:20:34 2004 +++ phpdoc-it/reference/filesystem/functions/fwrite.xml Tue Dec 21 08:21:58 2004 @@ -1,8 +1,8 @@ <?xml version="1.0" encoding="iso-8859-1"?> <!-- splitted from ./it/functions/filesystem.xml, last change in rev 1.15 --> -<!-- EN-Revision: 1.11 Maintainer: fernando Status: working --> - <!-- CREDITS: cortesi --> - <refentry id="function.fwrite"> +<!-- EN-Revision: 1.12 Maintainer: fernando Status: working --> +<!-- CREDITS: cortesi --> +<refentry id="function.fwrite"> <refnamediv> <refname>fwrite</refname> <refpurpose>Scrive un file salvaguardando la corrispondenza binaria</refpurpose> @@ -63,7 +63,7 @@ } // Scrive $somecontent nel file aperto. - if (fwrite($handle, $somecontent) === FALSE) { + if (!fwrite($handle, $somecontent) ===FALSE) { echo "Non si riesce a scrivere nel file ($filename)"; exit; } @@ -81,8 +81,11 @@ </example> </para> <simpara> - Vedere anche <function>fread</function>, <function>fopen</function>, - <function>fsockopen</function>, <function>popen</function>. + Vedere anche <function>fread</function>, + <function>fopen</function>, + <function>fsockopen</function>, + <function>popen</function> e + <function>file_put_contents</function>. </simpara> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc-it/reference/filesystem/functions/pathinfo.xml?r1=1.5&r2=1.6&ty=u Index: phpdoc-it/reference/filesystem/functions/pathinfo.xml diff -u phpdoc-it/reference/filesystem/functions/pathinfo.xml:1.5 phpdoc-it/reference/filesystem/functions/pathinfo.xml:1.6 --- phpdoc-it/reference/filesystem/functions/pathinfo.xml:1.5 Thu Sep 16 08:20:35 2004 +++ phpdoc-it/reference/filesystem/functions/pathinfo.xml Tue Dec 21 08:21:58 2004 @@ -1,8 +1,8 @@ <?xml version="1.0" encoding="iso-8859-1"?> <!-- splitted from ./it/functions/filesystem.xml, last change in rev 1.15 --> -<!-- EN-Revision: 1.6 Maintainer: fernando Status: working --> +<!-- EN-Revision: 1.7 Maintainer: fernando Status: working --> <!-- CREDITS: cortesi --> - <refentry id="function.pathinfo"> +<refentry id="function.pathinfo"> <refnamediv> <refname>pathinfo</refname> <refpurpose>Restituisce informazioni su un percorso di file</refpurpose> @@ -10,68 +10,64 @@ <refsect1> <title>Descrizione</title> <methodsynopsis> - <type>array</type><methodname>pathinfo</methodname> - <methodparam><type>string</type><parameter>path</parameter></methodparam> - <methodparam choice="opt"><type>int</type><parameter>options</parameter></methodparam> - </methodsynopsis> - <para> - <function>pathinfo</function> restituisce un vettore associativo contenente + <type>array</type><methodname>pathinfo</methodname> + <methodparam><type>string</type><parameter>path</parameter></methodparam> + <methodparam choice="opt"><type>int</type><parameter>options</parameter></methodparam> + </methodsynopsis> + <para> + <function>pathinfo</function> restituisce un vettore associativo contenente informazioni riguardo <parameter>path</parameter>. Nel vettore vegono riportati i seguenti elementi: - <literal>dirname</literal>, <literal>basename</literal> - e <literal>extension</literal>. - </para> - <para> - Si può specificare quali elementi debbano essere restituiti tramite il parametro - <parameter>options</parameter>. Questo è composto dalle costanti - <constant>PHP_PATHINFO_DIRNAME</constant>, - <constant>PHP_PATHINFO_BASENAME</constant> e - <constant>PHP_PATHINFO_EXTENSION</constant>. Per default - restituisce tutti gli elementi. - </para> - <para> - <example> - <title><function>pathinfo</function> Example</title> - <programlisting role="php"> -<![CDATA[ -<?php - -$path_parts = pathinfo("/www/htdocs/index.html"); - -echo $path_parts["dirname"] . "\n"; -echo $path_parts["basename"] . "\n"; -echo $path_parts["extension"] . "\n"; - -?> -]]> - </programlisting> - <para> - produrra: - </para> - <screen> -<![CDATA[ -/www/htdocs -index.html -html -]]> - </screen> - </example> - </para> - <note> - <para> - Per maggiori dettagli sul recupero del percorso corrente, leggere - la sezione <link linkend="language.variables.predefined"> - variabili predefinite riservate</link>. - </para> - </note> - <para> - Vedere anche <function>dirname</function>, - <function>basename</function>, <function>parse_url</function> - e <function>realpath</function>. - </para> - </refsect1> - </refentry> - + <literal>dirname</literal>, <literal>basename</literal> + e <literal>extension</literal>. + </para> + <para> Si può specificare quali elementi vengano restituiti con parametri opzionali + <parameter>options</parameter>. E' composto da + <constant>PATHINFO_DIRNAME</constant>, + <constant>PATHINFO_BASENAME</constant> e + <constant>PATHINFO_EXTENSION</constant>. Assume per defalut la restituzione di tutti + gli elementi. + </para> + <para> + <example> + <title><function>pathinfo</function> Example</title> + <programlisting role="php"> + <![CDATA[ + <?php + $path_parts = pathinfo('/www/htdocs/index.html'); + echo $path_parts['dirname'], "\n"; + echo $path_parts['basename'], "\n"; + echo $path_parts['extension'], "\n"; + + ?> + ]]> + </programlisting> + <para> Produrrà: + </para> + <screen> + <![CDATA[ + /www/htdocs + index.html + html + ]]> + </screen> + </example> + </para> + <note> + <para> + Per informazioni su come recuperare il path corrente, leggere + la sezione su <link linkend="language.variables.predefined"> + variabili riservate predefinite</link>. + </para> + </note> + <para> + Vedere anche <function>dirname</function>, + <function>basename</function>, + <function>parse_url</function> + e <function>realpath</function>. + </para> + </refsect1> + </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml http://cvs.php.net/diff.php/phpdoc-it/reference/filesystem/functions/tempnam.xml?r1=1.3&r2=1.4&ty=u Index: phpdoc-it/reference/filesystem/functions/tempnam.xml diff -u phpdoc-it/reference/filesystem/functions/tempnam.xml:1.3 phpdoc-it/reference/filesystem/functions/tempnam.xml:1.4 --- phpdoc-it/reference/filesystem/functions/tempnam.xml:1.3 Fri Feb 13 15:47:23 2004 +++ phpdoc-it/reference/filesystem/functions/tempnam.xml Tue Dec 21 08:21:58 2004 @@ -1,77 +1,74 @@ -<?xml version="1.0" encoding="iso-8859-1"?> -<!-- splitted from ./it/functions/filesystem.xml, last change in rev 1.15 --> -<!-- EN-Revision: 1.6 Maintainer: cortesi Status: working --> - <refentry id="function.tempnam"> - <refnamediv> - <refname>tempnam</refname> - <refpurpose>Crea un nome di file unico</refpurpose> - </refnamediv> - <refsect1> - <title>Descrizione</title> - <methodsynopsis> - <type>string</type><methodname>tempnam</methodname> - <methodparam><type>string</type><parameter>dir</parameter></methodparam> - <methodparam><type>string</type><parameter>prefix</parameter></methodparam> - </methodsynopsis> - <para> - Crea un nome di file temporaneo univoco nella directory specificata. - Se la directory non esiste, <function>tempnam</function> può - generare il nome file nella directory temporanea - del sistema. - </para> - <para> - Prima di PHP 4.0.6, il comportamento della funzione - <function>tempnam</function> dipendeva dal sistema. Su - Windows la variabile d'ambiente TMP scavalcherà il parametro - <parameter>dir</parameter>, su Linux la variabile d'ambiente TMPDIR - ha la precedenza, mentre SVR4 userà sempre - il tuo parametro <parameter>dir</parameter> se la directory cui punta esiste. - Consulta la documentazione del tuo sistema sulla funzione - tempnam(3) se non sei sicuro. - </para> - <note> - <simpara> - Se il PHP non è in grado di creare il file nella directory <parameter>dir</parameter> - la funzione passa alla directory di default del sistema. - </simpara> - </note> - <para> - Restituisce il nuovo filename temporaneo, o la stringa &null; se fallisce. - <example> - <title><function>tempnam</function> example</title> - <programlisting role="php"> -<![CDATA[ -<?php -$tmpfname = tempnam("/tmp", "FOO"); - -$handle = fopen($tmpfname, "w"); -fwrite($handle, "writing to tempfile"); - fclose($handle); - -// do here something - -unlink($tmpfname); -?> -]]> - </programlisting> - </example> - </para> - <note> - <simpara> - Il comportamento di questa funzione è cambiata in 4.0.3. - Il file temporaneo è anche creato per evitare una condizione di rincorsa - dove il file può apparire nel filesystem fra il momento che la stringa - viene generato e prima che lo script si occupi di crearlo. Note, that you need - to remove the file in case you need it no more, it is not done - automatically. - </simpara> - </note> - <para> - Vedere anche <function>tmpfile</function> e <function>unlink</function>. - </para> - </refsect1> - </refentry> - +<?xml version="1.0" encoding="iso-8859-1"?> +<!-- splitted from ./it/functions/filesystem.xml, last change in rev 1.2 --> +<!-- EN-Revision: 1.8 Maintainer: fernando Status: working --> + <!-- CREDITS: cortesi --> + <refentry id="function.tempnam"> + <refnamediv> + <refname>tempnam</refname> + <refpurpose>Crea file con unico nome file</refpurpose> + </refnamediv> + <refsect1> + <title>Descrizionen</title> + <methodsynopsis> + <type>string</type><methodname>tempnam</methodname> + <methodparam><type>string</type><parameter>dir</parameter></methodparam> + <methodparam><type>string</type><parameter>prefix</parameter></methodparam> + </methodsynopsis> + <para> + Crea un file con filename univoco nella directory specificata. + Se la directory non esiste, <function>tempnam</function> può + generare un file in una directory temporanea di sistema, e restituire + il nome di quest'ultima. + </para> + <para> + Precedentemente al PHP 4.0.6, il comportamento della funzione <function>tempnam</function> + dipendeva dal sistema. Su Windows il dispositivo di variabli TMP sovrascrive il + <parameter>dir</parameter> parametro, su Linux la variabile TMPDIR ha la precedenza, + mentre SVR4 utilizzerà sempre il parametro <parameter>dir</parameter> se la directory + a cui punta, esiste. Consultare la vostra documentazione sulla funzione tempnam(3) in caso di dubbi. + </para> + <note> + <simpara> + Se PHP non può creare un file nello specificato <parameter>dir</parameter> + parametro, ritorna al default di sistema. + </simpara> + </note> + <para> + Restituisce il nuovo nomefile temporaneo, o &false; in caso di + errore. + <example> + <title><function>tempnam</function> esempio</title> + <programlisting role="php"> + <![CDATA[ + <?php $tmpfname = tempnam("/tmp", "FOO"); + + $handle = fopen($tmpfname, "w"); + fwrite($handle, "writing to tempfile"); + fclose($handle); + + // do here something + + unlink($tmpfname); + ?> + ]]> + </programlisting> + </example> + </para> + <note> + <simpara> + Il funzionamento di questa funzione è cambiato nella 4.0.3. Il file temporaneo + è creato inoltre èer evitare un conflitto dove il file dovrebbe apparire + nel filesystem tra la volta in cui la stringa viene generata + e prima che lo script tenti di creare il file. Notare che se si necessita + cancellare il file, se non servisse più, non viene fatto + automaticamente. + </simpara> + </note> + <para> + Vedere anche <function>tmpfile</function> and <function>unlink</function>. + </para> + </refsect1> + </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml http://cvs.php.net/diff.php/phpdoc-it/reference/filesystem/functions/tmpfile.xml?r1=1.3&r2=1.4&ty=u Index: phpdoc-it/reference/filesystem/functions/tmpfile.xml diff -u phpdoc-it/reference/filesystem/functions/tmpfile.xml:1.3 phpdoc-it/reference/filesystem/functions/tmpfile.xml:1.4 --- phpdoc-it/reference/filesystem/functions/tmpfile.xml:1.3 Fri Feb 13 15:47:23 2004 +++ phpdoc-it/reference/filesystem/functions/tmpfile.xml Tue Dec 21 08:21:58 2004 @@ -1,66 +1,68 @@ -<?xml version="1.0" encoding="iso-8859-1"?> -<!-- splitted from ./it/functions/filesystem.xml, last change in rev 1.15 --> -<!-- EN-Revision: 1.4 Maintainer: cortesi Status: working --> - <refentry id="function.tmpfile"> - <refnamediv> - <refname>tmpfile</refname> - <refpurpose>Crea un file temporaneo</refpurpose> - </refnamediv> - <refsect1> - <title>Descrizione</title> - <methodsynopsis> - <type>resource</type><methodname>tmpfile</methodname> - <void/> - </methodsynopsis> - <para> - Crea un file temporaneo con un nome univoco il modalità di scrittura, - restituendo un riferimento al file simile a quello tornato da - <function>fopen</function>. - Il file viene automaticamente cancellato una volta chiuso (usando - <function>fclose</function>), o quando lo script termina. - </para> - <para> - Per dettagli, consulta la documentazione del tuo sistema sulla funzione - <literal>tmpfile(3)</literal>, così come il file haeader - <filename>stdio.h</filename>. - </para> - <para> - <example> - <title><function>tmpfile</function> example</title> - <programlisting role="php"> -<![CDATA[ - <?php -$temp = tmpfile(); -fwrite($temp, "writing to tempfile"); -fclose($temp); // this removes the file -?> -]]> - </programlisting> - </example> - </para> - <para> - Vedere anche <function>tempnam</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 ---> +<?xml version="1.0" encoding="iso-8859-1"?> +<!-- splitted from ./it/functions/filesystem.xml, last change in rev 1.32 --> +<!-- EN-Revision: 1.5 Maintainer: fernando Status: working --> + <refentry id="function.tmpfile"> + <refnamediv> + <refname>tmpfile</refname> + <refpurpose>Crea un file temporaneo</refpurpose> + </refnamediv> + <refsect1> + <title>Descrizione</title> + <methodsynopsis> + <type>resource</type><methodname>tmpfile</methodname> + <void/> + </methodsynopsis> + <para> Crea un file temporaneo con un nome univoco in modalità di lettura-scrittura (w+), + restituendo un riferimento al file simile a quello tornato da <function>fopen</function>. + Il file viene automaticamente cancellato una volta chiuso (usando + <function>fclose</function>), o quando lo script termina. + </para> + <para> Per dettagli, consulta la documentazione del tuo sistema sulla funzione + <literal>tmpfile(3)</literal>, così come il file haeader + <filename>stdio.h</filename>. + </para> + <para> + <example> + <title><function>tmpfile</function> example</title> + <programlisting role="php"> + <![CDATA[ + <?php + $temp = tmpfile(); + fwrite($temp, "writing to tempfile"); + fseek($temp, 0); + echo fread($temp, 1024); + fclose($temp); // this removes the file + ?> + ]]> + </programlisting> + &example.outputs; + <screen> + <![CDATA[ + writing toi tempfile + ]]> + </screen> + </example> + </para> + <para> Vedere anche <function>tempnam</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 + --> \ No newline at end of file http://cvs.php.net/diff.php/phpdoc-it/reference/filesystem/functions/touch.xml?r1=1.3&r2=1.4&ty=u Index: phpdoc-it/reference/filesystem/functions/touch.xml diff -u phpdoc-it/reference/filesystem/functions/touch.xml:1.3 phpdoc-it/reference/filesystem/functions/touch.xml:1.4 --- phpdoc-it/reference/filesystem/functions/touch.xml:1.3 Fri Feb 13 15:47:23 2004 +++ phpdoc-it/reference/filesystem/functions/touch.xml Tue Dec 21 08:21:58 2004 @@ -1,6 +1,7 @@ <?xml version="1.0" encoding="iso-8859-1"?> <!-- splitted from ./it/functions/filesystem.xml, last change in rev 1.15 --> -<!-- EN-Revision: 1.8 Maintainer: cortesi Status: working --> +<!-- EN-Revision: 1.9 Maintainer: fernando Status: working --> +<!-- CREDITS: cortesi --> <refentry id="function.touch"> <refnamediv> <refname>touch</refname> @@ -15,9 +16,9 @@ <methodparam choice="opt"><type>int</type><parameter>atime</parameter></methodparam> </methodsynopsis> <para> - Tenta di impostare l'ora di modifica del file indicato da filename - al valore dato da time. Se non viene passata l'opzione <parameter>time</parameter> - usa l'ora attuale. Questo equivale a quello che fa utime + Tenta di impostare l'ora di modifica del file indicato da + <parameter>filename</parameter>. Se il parametro <parameter>time</parameter> + non è passato, usa l'ora attuale. Ciò equivale a quello che fa utime (a volte indicato come utimes). Se è presente il terzo parametro opzionale <parameter>atime</parameter> è presente, viene utilizzato per impostare l'orario di accesso al file indicato. @@ -34,10 +35,9 @@ <![CDATA[ <?php if (touch($FileName)) { - echo "$FileName modification time has been - changed to todays date and time"; + echo "$FileName modification time has been changed to present time"; } else { - echo "Sorry Could Not change modification time of $FileName"; + echo "Sorry, could not change modification time of $FileName"; } ?> ]]> http://cvs.php.net/diff.php/phpdoc-it/reference/ftp/functions/ftp-pasv.xml?r1=1.2&r2=1.3&ty=u Index: phpdoc-it/reference/ftp/functions/ftp-pasv.xml diff -u phpdoc-it/reference/ftp/functions/ftp-pasv.xml:1.2 phpdoc-it/reference/ftp/functions/ftp-pasv.xml:1.3 --- phpdoc-it/reference/ftp/functions/ftp-pasv.xml:1.2 Wed Apr 17 03:06:46 2002 +++ phpdoc-it/reference/ftp/functions/ftp-pasv.xml Tue Dec 21 08:21:58 2004 @@ -1,29 +1,62 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- splitted from ./it/functions/ftp.xml, last change in rev 1.1 --> -<!-- last change to 'ftp-pasv' in en/ tree in rev 1.2 --> -<!-- EN-Revision: 1.2 Maintainer: colombo Status: working --> -<!-- OLD-Revision: 1.43/EN.1.2 --> +<!-- splitted from ./it/functions/ftp.xml, last change in rev 1.2 --> +<!-- last change to 'ftp-pasv' in en/ tree in rev 1.7 --> +<!-- EN-Revision: 1.5 Maintainer: afparam Status: ready --> +<!-- CREDITS: Colombo --> +<!-- OLD-Revision: 1.43/EN.1.7 --> <refentry id="function.ftp-pasv"> <refnamediv> <refname>ftp_pasv</refname> - <refpurpose>Abilita o disabilita la modalità passiva</refpurpose> + <refpurpose>Attivaa o disattiva il modo passivo</refpurpose> </refnamediv> <refsect1> <title>Descrizione</title> <methodsynopsis> - <type>int</type><methodname>ftp_pasv</methodname> - <methodparam><type>int</type><parameter>ftp_stream</parameter></methodparam> - <methodparam><type>int</type><parameter>pasv</parameter></methodparam> + <type>bool</type><methodname>ftp_pasv</methodname> + <methodparam><type>resource</type><parameter>ftp_stream</parameter></methodparam> + <methodparam><type>bool</type><parameter>pasv</parameter></methodparam> </methodsynopsis> <para> - <function>ftp_pasv</function>Abilita la modalità passiva se il parametro - <parameter>pasv</parameter> risulta &true; (disabilita la modalità - passiva se <parameter>pasv</parameter> risulta &false;.) In - modalità passiva la connessione viene iniziata dal client, + <function>ftp_pasv</function> attiva il modo passivo se + il parametro <parameter>pasv</parameter> e' &true;. Disattiva + il modo passivo se <parameter>pasv</parameter> e' &false;. Nel + modo passivo, le connessioni sono iniziate dal client piuttosto che dal server. </para> <para> - Restituisce &true; se a buon fine, &false; in caso di errore. + <example> + <title>Esempio di funzione <function>ftp_pasv</function></title> + <programlisting role="php"> +<![CDATA[ +<?php +$file = 'somefile.txt'; +$remote_file = 'readme.txt'; + +// stabilisce la connessione +$conn_id = ftp_connect($ftp_server); + +// si collega con username and password +$login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass); + +// attiva il modo passivo +ftp_pasv($conn_id, true); + +// trasferisce un file al server +if (ftp_put($conn_id, $remote_file, $file, FTP_ASCII)) { + echo "$file trasferito correttamente\n"; +} else { + echo "Si e' verificato un problema durante il trasferimento di $file\n"; +} + +// chiude la connessione +ftp_close($conn_id); +?> +]]> + </programlisting> + </example> + </para> + <para> + &return.success; </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc-it/reference/ftp/functions/ftp-put.xml?r1=1.2&r2=1.3&ty=u Index: phpdoc-it/reference/ftp/functions/ftp-put.xml diff -u phpdoc-it/reference/ftp/functions/ftp-put.xml:1.2 phpdoc-it/reference/ftp/functions/ftp-put.xml:1.3 --- phpdoc-it/reference/ftp/functions/ftp-put.xml:1.2 Wed Apr 17 03:06:46 2002 +++ phpdoc-it/reference/ftp/functions/ftp-put.xml Tue Dec 21 08:21:58 2004 @@ -1,41 +1,72 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- splitted from ./it/functions/ftp.xml, last change in rev 1.1 --> -<!-- last change to 'ftp-put' in en/ tree in rev 1.2 --> -<!-- EN-Revision: 1.2 Maintainer: colombo Status: working --> -<!-- OLD-Revision: 1.43/EN.1.2 --> +<!-- splitted from ./it/functions/ftp.xml, last change in rev 1.2 --> +<!-- last change to 'ftp-put' in en/ tree in rev 1.7 --> +<!-- EN-Revision: 1.7 Maintainer: afparam Status: ready --> +<!-- CREDITS: Colombo --> +<!-- OLD-Revision: 1.43/EN.1.7 --> + <refentry id="function.ftp-put"> <refnamediv> <refname>ftp_put</refname> - <refpurpose>Carica un file sul server FTP</refpurpose> + <refpurpose>Trasferisce un file al server FTP</refpurpose> </refnamediv> <refsect1> <title>Descrizione</title> <methodsynopsis> - <type>int</type><methodname>ftp_put</methodname> - <methodparam><type>int</type><parameter>ftp_stream</parameter></methodparam> + <type>bool</type><methodname>ftp_put</methodname> + <methodparam><type>resource</type><parameter>ftp_stream</parameter></methodparam> <methodparam><type>string</type><parameter>remote_file</parameter></methodparam> <methodparam><type>string</type><parameter>local_file</parameter></methodparam> <methodparam><type>int</type><parameter>mode</parameter></methodparam> + <methodparam choice="opt"><type>int</type><parameter>startpos</parameter></methodparam> </methodsynopsis> <para> <function>ftp_put</function> salva <parameter>local_file</parameter> - sul server FTP, come <parameter>remote_file</parameter>. Il parametro - <parameter>mode</parameter> che spedifica il tipo di trasferimento deve - essere <constant>FTP_ASCII</constant> oppure <constant>FTP_BINARY</constant>. + sul server FTP come <parameter>remote_file</parameter>. Il modo di trasferimento + <parameter>mode</parameter> specificato deve essere + <constant>FTP_ASCII</constant> oppure <constant>FTP_BINARY</constant>. </para> + <note> + <para> + Il parametro <parameter>startpos</parameter> e' stato aggiunto nella release PHP 4.3.0. + </para> + </note> <para> - Restituisce &true; se a buon fine, &false; in caso di errore. + &return.success; </para> <para> <example> - <title>Esempio di <function>ftp_put</function></title> + <title>Esempio di funzione <function>ftp_put</function></title> <programlisting role="php"> <![CDATA[ -$upload = ftp_put ($conn_id, $destination_file, $source_file, FTP_ASCII); +<?php +$file = 'somefile.txt'; +$remote_file = 'readme.txt'; + +// stabilisce la connessione +$conn_id = ftp_connect($ftp_server); + +// si collega con username and password +$login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass); + +// trasferisce un file al server +if (ftp_put($conn_id, $remote_file, $file, FTP_ASCII)) { + echo "$file trasferito correttamente\n"; +} else { + echo "Si e' verificato un problema durante il trasferimento di $file\n"; +} + +// chiude la connessione +ftp_close($conn_id); +?> ]]> </programlisting> </example> </para> + <para> + Vedere anche <function>ftp_fput</function>, <function>ftp_nb_fput</function>, + e <function>ftp_nb_put</function>. + </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc-it/reference/ftp/functions/ftp-pwd.xml?r1=1.2&r2=1.3&ty=u Index: phpdoc-it/reference/ftp/functions/ftp-pwd.xml diff -u phpdoc-it/reference/ftp/functions/ftp-pwd.xml:1.2 phpdoc-it/reference/ftp/functions/ftp-pwd.xml:1.3 --- phpdoc-it/reference/ftp/functions/ftp-pwd.xml:1.2 Wed Apr 17 03:06:47 2002 +++ phpdoc-it/reference/ftp/functions/ftp-pwd.xml Tue Dec 21 08:21:58 2004 @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- splitted from ./it/functions/ftp.xml, last change in rev 1.1 --> -<!-- last change to 'ftp-pwd' in en/ tree in rev 1.2 --> -<!-- EN-Revision: 1.2 Maintainer: colombo Status: working --> -<!-- OLD-Revision: 1.43/EN.1.2 --> +<!-- splitted from ./it/functions/ftp.xml, last change in rev 1.2 --> +<!-- last change to 'ftp-pwd' in en/ tree in rev 1.7 --> +<!-- EN-Revision: 1.4 Maintainer: afparam Status: ready --> +<!-- CREDITS: Colombo --> +<!-- OLD-Revision: 1.43/EN.1.7 --> + <refentry id="function.ftp-pwd"> <refnamediv> <refname>ftp_pwd</refname> @@ -12,10 +14,36 @@ <title>Descrizione</title> <methodsynopsis> <type>string</type><methodname>ftp_pwd</methodname> - <methodparam><type>int</type><parameter>ftp_stream</parameter></methodparam> + <methodparam><type>resource</type><parameter>ftp_stream</parameter></methodparam> </methodsynopsis> <para> - Restituisce il nome della directory corrente, oppure &false; in caso di errore. + Restituisce la directory corrente oppure &false; in caso di errore. + </para> + <para> + <example> + <title>Esempio di funzione <function>ftp_pwd</function></title> + <programlisting role="php"> +<![CDATA[ +<?php + +// stabilisce la connessione +$conn_id = ftp_connect($ftp_server); + +// si collega con username and password +$login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass); + +// si sposta sulla directory public_html +ftp_chdir($conn_id, 'public_html'); + +// stampa la directory corrente +echo ftp_pwd($conn_id); // /public_html + +// chiude la connessione +ftp_close($conn_id); +?> +]]> + </programlisting> + </example> </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc-it/reference/ftp/functions/ftp-quit.xml?r1=1.2&r2=1.3&ty=u Index: phpdoc-it/reference/ftp/functions/ftp-quit.xml diff -u phpdoc-it/reference/ftp/functions/ftp-quit.xml:1.2 phpdoc-it/reference/ftp/functions/ftp-quit.xml:1.3 --- phpdoc-it/reference/ftp/functions/ftp-quit.xml:1.2 Wed Apr 17 03:06:47 2002 +++ phpdoc-it/reference/ftp/functions/ftp-quit.xml Tue Dec 21 08:21:58 2004 @@ -1,22 +1,19 @@ <?xml version="1.0" encoding="iso-8859-1"?> <!-- splitted from ./it/functions/ftp.xml, last change in rev 1.1 --> -<!-- last change to 'ftp-quit' in en/ tree in rev 1.2 --> -<!-- EN-Revision: 1.2 Maintainer: colombo Status: working --> -<!-- OLD-Revision: 1.43/EN.1.2 --> +<!-- last change to 'ftp-quit' in en/ tree in rev 1.7 --> +<!-- EN-Revision: 1.3 Maintainer: afparam Status: ready --> +<!-- CREDITS: Colombo --> +<!-- OLD-Revision: 1.43/EN.1.7 --> + <refentry id="function.ftp-quit"> <refnamediv> <refname>ftp_quit</refname> - <refpurpose>Chiude una connessione FTP</refpurpose> + <refpurpose>Alias di <function>ftp_close</function></refpurpose> </refnamediv> <refsect1> <title>Descrizione</title> - <methodsynopsis> - <type>int</type><methodname>ftp_quit</methodname> - <methodparam><type>int</type><parameter>ftp_stream</parameter></methodparam> - </methodsynopsis> <para> - <function>ftp_quit</function> chiude - <parameter>ftp_stream</parameter>. + Questa funzione e' un alias di <function>ftp_close</function>. </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc-it/reference/ftp/functions/ftp-rawlist.xml?r1=1.2&r2=1.3&ty=u Index: phpdoc-it/reference/ftp/functions/ftp-rawlist.xml diff -u phpdoc-it/reference/ftp/functions/ftp-rawlist.xml:1.2 phpdoc-it/reference/ftp/functions/ftp-rawlist.xml:1.3 --- phpdoc-it/reference/ftp/functions/ftp-rawlist.xml:1.2 Wed Apr 17 03:06:47 2002 +++ phpdoc-it/reference/ftp/functions/ftp-rawlist.xml Tue Dec 21 08:21:58 2004 @@ -1,26 +1,72 @@ <?xml version="1.0" encoding="iso-8859-1"?> <!-- splitted from ./it/functions/ftp.xml, last change in rev 1.1 --> -<!-- last change to 'ftp-rawlist' in en/ tree in rev 1.2 --> -<!-- EN-Revision: 1.2 Maintainer: colombo Status: working --> -<!-- OLD-Revision: 1.43/EN.1.2 --> +<!-- last change to 'ftp-rawlist' in en/ tree in rev 1.7 --> +<!-- EN-Revision: 1.4 Maintainer: afparam Status: ready --> +<!-- CREDITS: Colombo --> +<!-- OLD-Revision: 1.43/EN.1.7 --> + <refentry id="function.ftp-rawlist"> <refnamediv> <refname>ftp_rawlist</refname> - <refpurpose>Restituisce l'elenco dettagliato dei file in una data directory</refpurpose> + <refpurpose>Restituisce un elenco dettagliato dei files nella directory in esame</refpurpose> </refnamediv> <refsect1> <title>Descrizione</title> <methodsynopsis> <type>array</type><methodname>ftp_rawlist</methodname> - <methodparam><type>int</type><parameter>ftp_stream</parameter></methodparam> + <methodparam><type>resource</type><parameter>ftp_stream</parameter></methodparam> <methodparam><type>string</type><parameter>directory</parameter></methodparam> </methodsynopsis> <para> - <function>ftp_rawlist</function> esegue il comando FTP LIST - e restituisce il risultato come un array. Ogni elemento dell'array corrisponde - ad una linea di testo. L'output non viene in alcun modo interpretato. - L'identificatore del tipo di sistema restituito da <function>ftp_systype</function> - può essere usato per determinare l'interpretazione del risultato. + <function>ftp_rawlist</function> esegue il comando FTP LIST, + e restituisce il risultato sotto forma di array. Ogni elemento dell'array corrisponde + ad una linea di testo. Sull'output non viene eseguito parsing. + L'identificatore di tipo di sistema restituito da <function>ftp_systype</function> + puo' essere utilizzato per interpretare il risultato. + </para> + <para> + <example> + <title>Esempio di funzione <function>ftp_rawlist</function></title> + <programlisting role="php"> +<![CDATA[ +<?php + +// stabilisce la connessione +$conn_id = ftp_connect($ftp_server); + +// si collega con username and password +$login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass); + +// ottiene l'elenco dei files di / +$buff = ftp_rawlist($conn_id, '/'); + +// chiude la connessione +ftp_close($conn_id); + +// visualizza il contenuto del buffer +var_dump($buff); +?> +]]> + </programlisting> + <para> + L'esempio precedente produrra' qualcosa di simile a: + </para> + <screen> +<![CDATA[ +array(3) { + [0]=> + string(65) "drwxr-x--- 3 vincent vincent 4096 Jul 12 12:16 public_ftp" + [1]=> + string(66) "drwxr-x--- 15 vincent vincent 4096 Nov 3 21:31 public_html" + [2]=> + string(73) "lrwxrwxrwx 1 vincent vincent 11 Jul 12 12:16 www -> public_html" +} +]]> + </screen> + </example> + </para> + <para> + Vedere anche <function>ftp_nlist</function>. </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc-it/reference/ftp/functions/ftp-rename.xml?r1=1.2&r2=1.3&ty=u Index: phpdoc-it/reference/ftp/functions/ftp-rename.xml diff -u phpdoc-it/reference/ftp/functions/ftp-rename.xml:1.2 phpdoc-it/reference/ftp/functions/ftp-rename.xml:1.3 --- phpdoc-it/reference/ftp/functions/ftp-rename.xml:1.2 Wed Apr 17 03:06:47 2002 +++ phpdoc-it/reference/ftp/functions/ftp-rename.xml Tue Dec 21 08:21:58 2004 @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="iso-8859-1"?> <!-- splitted from ./it/functions/ftp.xml, last change in rev 1.1 --> -<!-- last change to 'ftp-rename' in en/ tree in rev 1.2 --> -<!-- EN-Revision: 1.2 Maintainer: colombo Status: working --> -<!-- OLD-Revision: 1.43/EN.1.2 --> +<!-- last change to 'ftp-rename' in en/ tree in rev 1.7 --> +<!-- EN-Revision: 1.5 Maintainer: afparam Status: ready --> +<!-- CREDITS: Colombo --> +<!-- OLD-Revision: 1.43/EN.1.7 --> + <refentry id="function.ftp-rename"> <refnamediv> <refname>ftp_rename</refname> @@ -11,19 +13,48 @@ <refsect1> <title>Descrizione</title> <methodsynopsis> - <type>boolean</type><methodname>ftp_rename</methodname> + <type>bool</type><methodname>ftp_rename</methodname> <methodparam><type>resource</type><parameter>ftp_stream</parameter></methodparam> - <methodparam><type>string</type><parameter>da</parameter></methodparam> - <methodparam><type>string</type><parameter>a</parameter></methodparam> + <methodparam><type>string</type><parameter>from</parameter></methodparam> + <methodparam><type>string</type><parameter>to</parameter></methodparam> </methodsynopsis> <para> - <function>ftp_rename</function> rinomina il file o la cartella - che ha come nome corrente <parameter>da</parameter> con il nome - <parameter>a</parameter>, sul flusso FTP + <function>ftp_rename</function> rinomina il file o la directory il cui + nome corrente e' <parameter>from</parameter> con il nome + <parameter>to</parameter>, utilizzando lo stream FTP <parameter>ftp_stream</parameter>. </para> <para> - Restituisce &true; se a buon fine, &false; in caso di errore. + <example> + <title>Esempio di funzione <function>ftp_rename</function></title> + <programlisting role="php"> +<![CDATA[ +<?php +$old_file = 'somefile.txt.bak'; +$new_file = 'somefile.txt'; + +// stabilisce la connessione +$conn_id = ftp_connect($ftp_server); + +// si collega con username and password +$login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass); + +// prova a cambiare il nome $old_file nel nome $new_file +if (ftp_rename($conn_id, $old_file, $new_file)) { + echo "cambiamento nome da $old_file a $new_file effettuato\n"; +} else { + echo "Si e' verificato un problema durante il cambiamento di nome da $old_file a $new_file\n"; +} + +// chiude la connessione +ftp_close($conn_id); +?> +]]> + </programlisting> + </example> + </para> + <para> + &return.success; </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc-it/reference/ftp/functions/ftp-rmdir.xml?r1=1.2&r2=1.3&ty=u Index: phpdoc-it/reference/ftp/functions/ftp-rmdir.xml diff -u phpdoc-it/reference/ftp/functions/ftp-rmdir.xml:1.2 phpdoc-it/reference/ftp/functions/ftp-rmdir.xml:1.3 --- phpdoc-it/reference/ftp/functions/ftp-rmdir.xml:1.2 Wed Apr 17 03:06:47 2002 +++ phpdoc-it/reference/ftp/functions/ftp-rmdir.xml Tue Dec 21 08:21:58 2004 @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="iso-8859-1"?> <!-- splitted from ./it/functions/ftp.xml, last change in rev 1.1 --> -<!-- last change to 'ftp-rmdir' in en/ tree in rev 1.2 --> -<!-- EN-Revision: 1.2 Maintainer: colombo Status: working --> -<!-- OLD-Revision: 1.43/EN.1.2 --> +<!-- last change to 'ftp-rmdir' in en/ tree in rev 1.7 --> +<!-- EN-Revision: 1.7 Maintainer: afparam Status: ready --> +<!-- CREDITS: Colombo --> +<!-- OLD-Revision: 1.43/EN.1.7 --> + <refentry id="function.ftp-rmdir"> <refnamediv> <refname>ftp_rmdir</refname> @@ -11,15 +13,50 @@ <refsect1> <title>Descrizione</title> <methodsynopsis> - <type>int</type><methodname>ftp_rmdir</methodname> - <methodparam><type>int</type><parameter>ftp_stream</parameter></methodparam> + <type>bool</type><methodname>ftp_rmdir</methodname> + <methodparam><type>resource</type><parameter>ftp_stream</parameter></methodparam> <methodparam><type>string</type><parameter>directory</parameter></methodparam> </methodsynopsis> <para> Elimina la <parameter>directory</parameter> specificata. + <parameter>directory</parameter> deve essere un percorso + assoluto o relativo ad una directory vuota. + </para> + <para> + &return.success; + </para> + <para> + <example> + <title>Esempio di funzione <function>ftp_rmdir</function></title> + <programlisting role="php"> +<![CDATA[ +<?php + +$dir = 'www/'; + +// stabilisce la connesione +$conn_id = ftp_connect($ftp_server); + +// si collega con username and password +$login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass); + +// prova a eliminare la directory $dir +if (ftp_rmdir($conn_id, $dir)) { + echo "Directory $dir eliminata\n"; +} else { + echo "Si e' verificato un problema durante l'eliminazione di $dir\n"; +} + +ftp_close($conn_id); + +?> +]]> + </programlisting> + </example> </para> <para> - Restituisce &true; in caso di successo, &false; in caso di errore.</para> + Vedere anche <function>ftp_mkdir</function>. + </para> </refsect1> </refentry>
http://cvs.php.net/diff.php/phpdoc-it/reference/filesystem/functions/copy.xml?r1=1.8&r2=1.9&ty=u Index: phpdoc-it/reference/filesystem/functions/copy.xml diff -u phpdoc-it/reference/filesystem/functions/copy.xml:1.8 phpdoc-it/reference/filesystem/functions/copy.xml:1.9 --- phpdoc-it/reference/filesystem/functions/copy.xml:1.8 Thu Sep 16 08:20:33 2004 +++ phpdoc-it/reference/filesystem/functions/copy.xml Tue Dec 21 08:21:58 2004 @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="iso-8859-1"?> +<?xml version="1.2" encoding="iso-8859-1"?> <!-- EN-Revision: 1.10 Maintainer: fernando Status: ready --> <!-- CREDITS: cortesi --> <!-- splitted from ./it/functions/filesystem.xml, last change in rev 1.15 --> @@ -25,7 +25,10 @@ $file = 'example.txt'; $newfile = 'example.txt.bak'; -if (!copy($file, $newfile)) { +$file = 'example.txt'; +$newfile = 'example.txt.bak'; + + if (!copy($file, $newfile)) { echo "Copia di $file non riuscita ...\n"; } ?> @@ -49,9 +52,9 @@ </warning> <note> <para> - Windows Compatability Note: If you copy a file with no size, - <function>copy</function> will return false, but the file will be correctly - copied. + Nota di compatibilità con Windows: se viene copiato un file vuoto, + <function>copy</function> restituisce falso, ma il file sarà copiato + correttamente. </para> </note> <para> http://cvs.php.net/diff.php/phpdoc-it/reference/filesystem/functions/feof.xml?r1=1.6&r2=1.7&ty=u Index: phpdoc-it/reference/filesystem/functions/feof.xml diff -u phpdoc-it/reference/filesystem/functions/feof.xml:1.6 phpdoc-it/reference/filesystem/functions/feof.xml:1.7 --- phpdoc-it/reference/filesystem/functions/feof.xml:1.6 Thu Sep 16 08:20:33 2004 +++ phpdoc-it/reference/filesystem/functions/feof.xml Tue Dec 21 08:21:58 2004 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- EN-Revision: 1.8 Maintainer: fernando Status: working --> +<!-- EN-Revision: 1.9 Maintainer: fernando Status: working --> <!-- CREDITS: cortesi --> <refentry id="function.feof"> <refnamediv> @@ -18,11 +18,11 @@ </para> <warning> <simpara> - La funzione <function>feof</function> restituirà &true; soltanto se la connessione aperta da - <function>fsockopen</function> è chiusa. Ciò può portare in timeout lo - lo script. Un trucco per evitare ciò consiste nell'utilizzare la funzione - <function>stream_set_timeout</function>, in modo da costringere - <function>feof</function> che restituirà &false; in caso di timeout. + Se una connessione aperta da <function>fsockopen</function> non è stata chiusa + dal server, <function>feof</function> attenderà finchè un timeout + non sia stato raggiunto e restituisce &true;. Il valore di timeout di default è + 60 secondi. Si può usare <function>stream_set_timeout</function> per cambiare questo + valore. </simpara> </warning> &fs.validfp.all; http://cvs.php.net/diff.php/phpdoc-it/reference/filesystem/functions/fgetcsv.xml?r1=1.8&r2=1.9&ty=u Index: phpdoc-it/reference/filesystem/functions/fgetcsv.xml diff -u phpdoc-it/reference/filesystem/functions/fgetcsv.xml:1.8 phpdoc-it/reference/filesystem/functions/fgetcsv.xml:1.9 --- phpdoc-it/reference/filesystem/functions/fgetcsv.xml:1.8 Thu Sep 16 08:20:34 2004 +++ phpdoc-it/reference/filesystem/functions/fgetcsv.xml Tue Dec 21 08:21:58 2004 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- EN-Revision: 1.10 Maintainer: fernando Status: working --> +<!-- EN-Revision: 1.16 Maintainer: fernando Status: working --> <!-- CREDITS: cortesi --> <!-- splitted from ./it/functions/filesystem.xml, last change in rev 1.2 --> <refentry id="function.fgetcsv"> @@ -12,20 +12,53 @@ <methodsynopsis> <type>array</type><methodname>fgetcsv</methodname> <methodparam><type>resource</type><parameter>handle</parameter></methodparam> - <methodparam><type>int</type><parameter>lunghezza</parameter></methodparam> + <methodparam choice="opt"><type>int</type><parameter>lunghezza</parameter></methodparam> <methodparam choice="opt"><type>string</type><parameter>delimitatore</parameter></methodparam> <methodparam choice="opt"><type>string</type><parameter>enclosure</parameter></methodparam> </methodsynopsis> - <simpara> + + <para> + <variablelist> + <varlistentry> + <term><parameter>handle</parameter></term> + <listitem> + <simpara> + Un puntatore valido a un file che punta a un file aperto con successo da <function>fopen</function>, + <function>popen</function>, o <function>fsockopen</function>. + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>length</parameter> (Opzionale)</term> + <listitem> + <simpara> + Deve essere più grande della linea più lunga (in caratteri) per essere trovato nel file CSV + (permettendo di trascinare il carattere di fine linea). E' diventato opzionale in PHP 5. + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>delimiter</parameter> (Opzionale)</term> + <listitem> + <simpara> + Setta il delimitatore di campo (un solo carattere). Virgola per default. + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>enclosure</parameter> (Opzionale)</term> + <listitem> + <simpara> + Setta il carattere di inclusione nel campo (un solo carattere). Doppie virgolette per default. Aggiunto in PHP 4.3.0. + </simpara> + </listitem> + </varlistentry> + </variablelist> + </para> <simpara> Simile a <function>fgets</function> eccetto per il fatto che <function>fgetcsv</function> analizza le righe lette alla ricerca di campi in formato <acronym>CSV</acronym> e restituisce un vettore contenente - i campi letti. Il delimitatore di campo è una virgola, a meno che non - venga specificato un altro delimitatore usando il terzo parametro opzionale, - mentre per il quarto parametro opzionale, <parameter>enclosure</parameter>, - il default sono i doppi apici. Entrambi i parametri, <parameter>delimitatore</parameter> - ed <parameter>enclosure</parameter>, hanno la dimensione di un carattere. - Se si forniscono stringhe di più di un carattere, verrà considerato solo il primo. + i campi letti. </simpara> <note> <simpara> @@ -63,7 +96,7 @@ $handle = fopen("test.csv","r"); while (($data = fgetcsv($handle, 1000, ",")) !== FALSE) { $num = count($data); - echo "<p> $num campi sulla linea $row: <br >\n"; + echo "<p> $num campi sulla linea $row: <br /></p>\n"; $row++; for ($c=0; $c < $num; $c++) { echo $data[$c] . "<br>\n"; @@ -76,8 +109,12 @@ </example> </para> <para> - Vedere anche <function>explode</function>, <function>file</function> e - <function>pack</function>. + <function>fgetcsv</function> è diventata binary safe dal PHP 4.3.5 + </para> + ¬e.line-endings; + <para> + Vedere anche <function>explode</function>, <function>file</function>, + <function>pack</function> e <function>fputcsv</function>. </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc-it/reference/filesystem/functions/file-get-contents.xml?r1=1.5&r2=1.6&ty=u Index: phpdoc-it/reference/filesystem/functions/file-get-contents.xml diff -u phpdoc-it/reference/filesystem/functions/file-get-contents.xml:1.5 phpdoc-it/reference/filesystem/functions/file-get-contents.xml:1.6 --- phpdoc-it/reference/filesystem/functions/file-get-contents.xml:1.5 Thu Aug 12 09:55:09 2004 +++ phpdoc-it/reference/filesystem/functions/file-get-contents.xml Tue Dec 21 08:21:58 2004 @@ -1,8 +1,8 @@ <?xml version="1.0" encoding="iso-8859-1"?> <!-- splitted from ./it/functions/filesystem.xml, last change in rev 1.15 --> <!-- last change to 'file-get-contents' in en/ tree in rev 1.130 --> -<!-- EN-Revision: 1.16 Maintainer: cortesi Status: working --> -<!-- OLD-Revision: 1.134/EN.1.130 --> +<!-- EN-Revision: 1.21 Maintainer: fernando Status: working --> +<!-- CREDITS: cortesi --> <refentry id="function.file-get-contents"> <refnamediv> <refname>file_get_contents</refname> @@ -15,42 +15,34 @@ <methodparam><type>string</type><parameter>filename</parameter></methodparam> <methodparam choice="opt"><type>bool</type><parameter>use_include_path</parameter></methodparam> <methodparam choice="opt"><type>resource</type><parameter>context</parameter></methodparam> + <methodparam choice="opt"><type>int</type><parameter>offset</parameter></methodparam> </methodsynopsis> <para> Simile alla funzione <function>file</function>, tranne che - <function>file_get_contents</function> restituisce il file in una stringa. + <function>file_get_contents</function> restituisce il file in una stringa, + iniziando allo specificato <parameter>offset</parameter>. Se si verifica un errore <function>file_get_contents</function> restituirà &false; </para> - <para> - La funzione <function>file_get_contents</function> è la via preferenziale - per leggere il contenuto di un file in una stringa. La funzione - utilizza tecniche di mappatura della memoria, se sono supportate dal sistema operativo, - per ottimizzare le prestazioni. - </para> - <example> - <title>Utilizzo di <function>file_get_contents</function> con un URI</title> + <note> + <simpara> + Il parametro<parameter>offset</parameter> è stato aggiunto nel PHP 5.1.0. + </simpara> + </note> + <note> <para> - Se si deve aprire un URI con caratteri speciali, tipo spazi, occorre codificare - l'URI con <function>urlencode</function>. + Se si sta aprendo un URI con caratteri speciali, spazi ad esempio, + si ha bisogno di decodificare l' URI con <function>urlencode</function>. </para> - <programlisting role="php"> -<![CDATA[ -<?php -$url = "http://foobar.com/with funny chars"; -list($protocol, $uri) = split("//", $url); -$html = file_get_contents($proto . "//" . urlencode($uri)); -?> -]]> - </programlisting> - </example> + </note> ¬e.bin-safe; &tip.fopen-wrapper; ¬e.context-support; &warn.ssl-non-standard; <simpara> - Vedere anche: <function>fgets</function>, <function>file</function>, - <function>fread</function>, <function>include</function> - e <function>readfile</function>. + Vedere anche <function>fgets</function>, <function>file</function>, + <function>fread</function>, <function>include</function>, + <function>readfile</function> &listendand; + <function>file_put_contents</function>. </simpara> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc-it/reference/filesystem/functions/flock.xml?r1=1.5&r2=1.6&ty=u Index: phpdoc-it/reference/filesystem/functions/flock.xml diff -u phpdoc-it/reference/filesystem/functions/flock.xml:1.5 phpdoc-it/reference/filesystem/functions/flock.xml:1.6 --- phpdoc-it/reference/filesystem/functions/flock.xml:1.5 Thu Sep 16 08:20:34 2004 +++ phpdoc-it/reference/filesystem/functions/flock.xml Tue Dec 21 08:21:58 2004 @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="iso-8859-1"?> <!-- splitted from ./it/functions/filesystem.xml, last change in rev 1.15 --> <!-- last change to 'flock' in en/ tree in rev 1.2 --> -<!-- EN-Revision: 1.9 Maintainer: fernando Status: working --> +<!-- EN-Revision: 1.11 Maintainer: fernando Status: working --> <!-- CREDITS: cortesi --> <!-- OLD-Revision: 1.134/EN.1.2 --> <refentry id="function.flock"> @@ -15,7 +15,7 @@ <type>bool</type><methodname>flock</methodname> <methodparam><type>resource</type><parameter>handle</parameter></methodparam> <methodparam><type>int</type><parameter>operation</parameter></methodparam> - <methodparam choice="opt"><type>int</type><parameter>&wouldblock</parameter></methodparam> + <methodparam choice="opt"><type>int</type><parameter role="reference">wouldblock</parameter></methodparam> </methodsynopsis> <simpara> Il PHP supporta un tecnologia portabile per bloccare file completi in modalità @@ -70,7 +70,8 @@ lettura/scrittura che in teoria può essere usato su qualsiasi piattaforma (inclusi molti sistemi Unix e anche Windows). Il terzo argomento (opzionale) può essere impostato a &true; se la chiave puo bloccare (EWOULDBLOCK - errno condition) + errno condition). Il blocco è realizzato anche da <function>fclose</function> + (che è anche richiamata automaticamente quando lo script termina). </simpara> <simpara> &return.success; http://cvs.php.net/diff.php/phpdoc-it/reference/filesystem/functions/fopen.xml?r1=1.7&r2=1.8&ty=u Index: phpdoc-it/reference/filesystem/functions/fopen.xml diff -u phpdoc-it/reference/filesystem/functions/fopen.xml:1.7 phpdoc-it/reference/filesystem/functions/fopen.xml:1.8 --- phpdoc-it/reference/filesystem/functions/fopen.xml:1.7 Thu Sep 16 08:20:34 2004 +++ phpdoc-it/reference/filesystem/functions/fopen.xml Tue Dec 21 08:21:58 2004 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- EN-Revision: 1.24 Maintainer: fernando Status: working --> +<!-- EN-Revision: 1.25 Maintainer: fernando Status: working --> <!-- CREDITS: cortesi --> <!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 --> <refentry id="function.fopen"> @@ -57,6 +57,15 @@ </simpara> </note> ¬e.context-support; + <note> + <simpara> + Come per PHP 4.3.2, la modalità di default è impostata a binarioper tutte + le piattaforme che distinguono tra modalità binaria e testuale. Se si hanno problemi + con i propri script dopo l'aggiornamento, provare a utilizzare il flag + <literal>'t'</literal> come sostitutivo finchè si ha completato uno + script maggiormente portabile come richiesto sopra. + </simpara> + </note> <para> Il parametro <parameter>mode</parameter> indica il tipo di accesso richiesto per il flusso. Esso può essere: @@ -186,25 +195,20 @@ possono avere situazioni anomale nei dati, tipo immagini corrotte, e situazioni anomale con i caratteri <literal>\r\n</literal>. </para> + </note> + <note> + <para> + Per la portabilità, si consiglia vivamente di usare sempre il flag + 'b' quando si aprono files con <function>fopen</function>. + </para> + </note> + <note> <para> - <emphasis>Per motivi di portabilità è fortemente raccomandato l'uso - del flag 'b' quando si aprono dei file con <function>fopen</function>. - </emphasis> - </para> - <para> - <emphasis>Inoltre, sempre per la portabilità, è anche fortemente raccomandato - di aggiornare il codice che utilizza o che confida nel modalità - <literal>'t'</literal> in modo da utilizzare il corretto terminatore di linea. - </emphasis> - </para> - <para> - <emphasis>A partire dal PHP 4.3.2, per tutte le piattaforme che distinguono tra - tra testo e binario, la modalità di default è la binaria. Se si hanno problemi - negli script dopo l'aggiornamneto, tentare l'utilizzo del flag - <literal>'t'</literal> per tamponare i problemi fino a quando non si - sono resi gli script più portabili come descritto in precedenza. - </emphasis> - </para> + Inoltre, sempre per la portabilità, è anche fortemente raccomandato + di aggiornare il codice che utilizza o che si avvale del mode + <literal>'t'</literal> così da utilizzare il corretto terminatore di linea invece del + <literal>'b'</literal> mode. + </para> </note> <para> Il terzo parametro opzionale <parameter>use_include_path</parameter> http://cvs.php.net/diff.php/phpdoc-it/reference/filesystem/functions/fscanf.xml?r1=1.4&r2=1.5&ty=u Index: phpdoc-it/reference/filesystem/functions/fscanf.xml diff -u phpdoc-it/reference/filesystem/functions/fscanf.xml:1.4 phpdoc-it/reference/filesystem/functions/fscanf.xml:1.5 --- phpdoc-it/reference/filesystem/functions/fscanf.xml:1.4 Thu Aug 12 09:55:09 2004 +++ phpdoc-it/reference/filesystem/functions/fscanf.xml Tue Dec 21 08:21:58 2004 @@ -1,5 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- EN-Revision: 1.15 Maintainer: cortesi Status: working --> +<!-- EN-Revision: 1.16 Maintainer: fernando Status: working --> +<!-- CREDITS: cortesi --> <!-- OLD-Revision: 1.134/EN.1.2 --> <refentry id="function.fscanf"> <refnamediv> @@ -12,8 +13,8 @@ <type>mixed</type><methodname>fscanf</methodname> <methodparam><type>resource</type><parameter>handle</parameter></methodparam> <methodparam><type>string</type><parameter>format</parameter></methodparam> - <methodparam choice="opt"><type>mixed</type><parameter>&...</parameter></methodparam> - </methodsynopsis> + <methodparam choice="opt"><type>mixed</type><parameter role="reference">...</parameter></methodparam> + </methodsynopsis> <para> La funzione <function>fscanf</function> è simile a <function>sscanf</function>, ma prende il proprio input da un file @@ -48,7 +49,7 @@ </programlisting> </example> <example> - <title>Contenuto di users.txt</title> + <title>Cntyennts of users.txt</title> <programlisting role="txt"> <![CDATA[ javier argonaut pe http://cvs.php.net/diff.php/phpdoc-it/reference/filesystem/functions/fseek.xml?r1=1.5&r2=1.6&ty=u Index: phpdoc-it/reference/filesystem/functions/fseek.xml diff -u phpdoc-it/reference/filesystem/functions/fseek.xml:1.5 phpdoc-it/reference/filesystem/functions/fseek.xml:1.6 --- phpdoc-it/reference/filesystem/functions/fseek.xml:1.5 Thu Sep 16 08:20:34 2004 +++ phpdoc-it/reference/filesystem/functions/fseek.xml Tue Dec 21 08:21:58 2004 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> <!-- splitted from ./it/functions/filesystem.xml, last change in rev 1.15 --> -<!-- EN-Revision: 1.8 Maintainer: fernando Status: working --> +<!-- EN-Revision: 1.9 Maintainer: fernando Status: working --> <!-- CREDITS: cortesi --> <refentry id="function.fseek"> <refnamediv> @@ -18,7 +18,7 @@ <para> Imposta l'indicatore di posizione del file riferito da <parameter>handle</parameter>. La nuova posizione, misurata in byte - dall'inizio del file, viene ottenuta aggiungento + dall'inizio del file, si ottiene aggiungendo <parameter>offset</parameter> alla posizione specificata da <parameter>whence</parameter>, i cui valori sono definiti come segue: http://cvs.php.net/diff.php/phpdoc-it/reference/filesystem/functions/fwrite.xml?r1=1.5&r2=1.6&ty=u Index: phpdoc-it/reference/filesystem/functions/fwrite.xml diff -u phpdoc-it/reference/filesystem/functions/fwrite.xml:1.5 phpdoc-it/reference/filesystem/functions/fwrite.xml:1.6 --- phpdoc-it/reference/filesystem/functions/fwrite.xml:1.5 Thu Sep 16 08:20:34 2004 +++ phpdoc-it/reference/filesystem/functions/fwrite.xml Tue Dec 21 08:21:58 2004 @@ -1,8 +1,8 @@ <?xml version="1.0" encoding="iso-8859-1"?> <!-- splitted from ./it/functions/filesystem.xml, last change in rev 1.15 --> -<!-- EN-Revision: 1.11 Maintainer: fernando Status: working --> - <!-- CREDITS: cortesi --> - <refentry id="function.fwrite"> +<!-- EN-Revision: 1.12 Maintainer: fernando Status: working --> +<!-- CREDITS: cortesi --> +<refentry id="function.fwrite"> <refnamediv> <refname>fwrite</refname> <refpurpose>Scrive un file salvaguardando la corrispondenza binaria</refpurpose> @@ -63,7 +63,7 @@ } // Scrive $somecontent nel file aperto. - if (fwrite($handle, $somecontent) === FALSE) { + if (!fwrite($handle, $somecontent) ===FALSE) { echo "Non si riesce a scrivere nel file ($filename)"; exit; } @@ -81,8 +81,11 @@ </example> </para> <simpara> - Vedere anche <function>fread</function>, <function>fopen</function>, - <function>fsockopen</function>, <function>popen</function>. + Vedere anche <function>fread</function>, + <function>fopen</function>, + <function>fsockopen</function>, + <function>popen</function> e + <function>file_put_contents</function>. </simpara> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc-it/reference/filesystem/functions/pathinfo.xml?r1=1.5&r2=1.6&ty=u Index: phpdoc-it/reference/filesystem/functions/pathinfo.xml diff -u phpdoc-it/reference/filesystem/functions/pathinfo.xml:1.5 phpdoc-it/reference/filesystem/functions/pathinfo.xml:1.6 --- phpdoc-it/reference/filesystem/functions/pathinfo.xml:1.5 Thu Sep 16 08:20:35 2004 +++ phpdoc-it/reference/filesystem/functions/pathinfo.xml Tue Dec 21 08:21:58 2004 @@ -1,8 +1,8 @@ <?xml version="1.0" encoding="iso-8859-1"?> <!-- splitted from ./it/functions/filesystem.xml, last change in rev 1.15 --> -<!-- EN-Revision: 1.6 Maintainer: fernando Status: working --> +<!-- EN-Revision: 1.7 Maintainer: fernando Status: working --> <!-- CREDITS: cortesi --> - <refentry id="function.pathinfo"> +<refentry id="function.pathinfo"> <refnamediv> <refname>pathinfo</refname> <refpurpose>Restituisce informazioni su un percorso di file</refpurpose> @@ -10,68 +10,64 @@ <refsect1> <title>Descrizione</title> <methodsynopsis> - <type>array</type><methodname>pathinfo</methodname> - <methodparam><type>string</type><parameter>path</parameter></methodparam> - <methodparam choice="opt"><type>int</type><parameter>options</parameter></methodparam> - </methodsynopsis> - <para> - <function>pathinfo</function> restituisce un vettore associativo contenente + <type>array</type><methodname>pathinfo</methodname> + <methodparam><type>string</type><parameter>path</parameter></methodparam> + <methodparam choice="opt"><type>int</type><parameter>options</parameter></methodparam> + </methodsynopsis> + <para> + <function>pathinfo</function> restituisce un vettore associativo contenente informazioni riguardo <parameter>path</parameter>. Nel vettore vegono riportati i seguenti elementi: - <literal>dirname</literal>, <literal>basename</literal> - e <literal>extension</literal>. - </para> - <para> - Si può specificare quali elementi debbano essere restituiti tramite il parametro - <parameter>options</parameter>. Questo è composto dalle costanti - <constant>PHP_PATHINFO_DIRNAME</constant>, - <constant>PHP_PATHINFO_BASENAME</constant> e - <constant>PHP_PATHINFO_EXTENSION</constant>. Per default - restituisce tutti gli elementi. - </para> - <para> - <example> - <title><function>pathinfo</function> Example</title> - <programlisting role="php"> -<![CDATA[ -<?php - -$path_parts = pathinfo("/www/htdocs/index.html"); - -echo $path_parts["dirname"] . "\n"; -echo $path_parts["basename"] . "\n"; -echo $path_parts["extension"] . "\n"; - -?> -]]> - </programlisting> - <para> - produrra: - </para> - <screen> -<![CDATA[ -/www/htdocs -index.html -html -]]> - </screen> - </example> - </para> - <note> - <para> - Per maggiori dettagli sul recupero del percorso corrente, leggere - la sezione <link linkend="language.variables.predefined"> - variabili predefinite riservate</link>. - </para> - </note> - <para> - Vedere anche <function>dirname</function>, - <function>basename</function>, <function>parse_url</function> - e <function>realpath</function>. - </para> - </refsect1> - </refentry> - + <literal>dirname</literal>, <literal>basename</literal> + e <literal>extension</literal>. + </para> + <para> Si può specificare quali elementi vengano restituiti con parametri opzionali + <parameter>options</parameter>. E' composto da + <constant>PATHINFO_DIRNAME</constant>, + <constant>PATHINFO_BASENAME</constant> e + <constant>PATHINFO_EXTENSION</constant>. Assume per defalut la restituzione di tutti + gli elementi. + </para> + <para> + <example> + <title><function>pathinfo</function> Example</title> + <programlisting role="php"> + <![CDATA[ + <?php + $path_parts = pathinfo('/www/htdocs/index.html'); + echo $path_parts['dirname'], "\n"; + echo $path_parts['basename'], "\n"; + echo $path_parts['extension'], "\n"; + + ?> + ]]> + </programlisting> + <para> Produrrà: + </para> + <screen> + <![CDATA[ + /www/htdocs + index.html + html + ]]> + </screen> + </example> + </para> + <note> + <para> + Per informazioni su come recuperare il path corrente, leggere + la sezione su <link linkend="language.variables.predefined"> + variabili riservate predefinite</link>. + </para> + </note> + <para> + Vedere anche <function>dirname</function>, + <function>basename</function>, + <function>parse_url</function> + e <function>realpath</function>. + </para> + </refsect1> + </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml http://cvs.php.net/diff.php/phpdoc-it/reference/filesystem/functions/tempnam.xml?r1=1.3&r2=1.4&ty=u Index: phpdoc-it/reference/filesystem/functions/tempnam.xml diff -u phpdoc-it/reference/filesystem/functions/tempnam.xml:1.3 phpdoc-it/reference/filesystem/functions/tempnam.xml:1.4 --- phpdoc-it/reference/filesystem/functions/tempnam.xml:1.3 Fri Feb 13 15:47:23 2004 +++ phpdoc-it/reference/filesystem/functions/tempnam.xml Tue Dec 21 08:21:58 2004 @@ -1,77 +1,74 @@ -<?xml version="1.0" encoding="iso-8859-1"?> -<!-- splitted from ./it/functions/filesystem.xml, last change in rev 1.15 --> -<!-- EN-Revision: 1.6 Maintainer: cortesi Status: working --> - <refentry id="function.tempnam"> - <refnamediv> - <refname>tempnam</refname> - <refpurpose>Crea un nome di file unico</refpurpose> - </refnamediv> - <refsect1> - <title>Descrizione</title> - <methodsynopsis> - <type>string</type><methodname>tempnam</methodname> - <methodparam><type>string</type><parameter>dir</parameter></methodparam> - <methodparam><type>string</type><parameter>prefix</parameter></methodparam> - </methodsynopsis> - <para> - Crea un nome di file temporaneo univoco nella directory specificata. - Se la directory non esiste, <function>tempnam</function> può - generare il nome file nella directory temporanea - del sistema. - </para> - <para> - Prima di PHP 4.0.6, il comportamento della funzione - <function>tempnam</function> dipendeva dal sistema. Su - Windows la variabile d'ambiente TMP scavalcherà il parametro - <parameter>dir</parameter>, su Linux la variabile d'ambiente TMPDIR - ha la precedenza, mentre SVR4 userà sempre - il tuo parametro <parameter>dir</parameter> se la directory cui punta esiste. - Consulta la documentazione del tuo sistema sulla funzione - tempnam(3) se non sei sicuro. - </para> - <note> - <simpara> - Se il PHP non è in grado di creare il file nella directory <parameter>dir</parameter> - la funzione passa alla directory di default del sistema. - </simpara> - </note> - <para> - Restituisce il nuovo filename temporaneo, o la stringa &null; se fallisce. - <example> - <title><function>tempnam</function> example</title> - <programlisting role="php"> -<![CDATA[ -<?php -$tmpfname = tempnam("/tmp", "FOO"); - -$handle = fopen($tmpfname, "w"); -fwrite($handle, "writing to tempfile"); - fclose($handle); - -// do here something - -unlink($tmpfname); -?> -]]> - </programlisting> - </example> - </para> - <note> - <simpara> - Il comportamento di questa funzione è cambiata in 4.0.3. - Il file temporaneo è anche creato per evitare una condizione di rincorsa - dove il file può apparire nel filesystem fra il momento che la stringa - viene generato e prima che lo script si occupi di crearlo. Note, that you need - to remove the file in case you need it no more, it is not done - automatically. - </simpara> - </note> - <para> - Vedere anche <function>tmpfile</function> e <function>unlink</function>. - </para> - </refsect1> - </refentry> - +<?xml version="1.0" encoding="iso-8859-1"?> +<!-- splitted from ./it/functions/filesystem.xml, last change in rev 1.2 --> +<!-- EN-Revision: 1.8 Maintainer: fernando Status: working --> + <!-- CREDITS: cortesi --> + <refentry id="function.tempnam"> + <refnamediv> + <refname>tempnam</refname> + <refpurpose>Crea file con unico nome file</refpurpose> + </refnamediv> + <refsect1> + <title>Descrizionen</title> + <methodsynopsis> + <type>string</type><methodname>tempnam</methodname> + <methodparam><type>string</type><parameter>dir</parameter></methodparam> + <methodparam><type>string</type><parameter>prefix</parameter></methodparam> + </methodsynopsis> + <para> + Crea un file con filename univoco nella directory specificata. + Se la directory non esiste, <function>tempnam</function> può + generare un file in una directory temporanea di sistema, e restituire + il nome di quest'ultima. + </para> + <para> + Precedentemente al PHP 4.0.6, il comportamento della funzione <function>tempnam</function> + dipendeva dal sistema. Su Windows il dispositivo di variabli TMP sovrascrive il + <parameter>dir</parameter> parametro, su Linux la variabile TMPDIR ha la precedenza, + mentre SVR4 utilizzerà sempre il parametro <parameter>dir</parameter> se la directory + a cui punta, esiste. Consultare la vostra documentazione sulla funzione tempnam(3) in caso di dubbi. + </para> + <note> + <simpara> + Se PHP non può creare un file nello specificato <parameter>dir</parameter> + parametro, ritorna al default di sistema. + </simpara> + </note> + <para> + Restituisce il nuovo nomefile temporaneo, o &false; in caso di + errore. + <example> + <title><function>tempnam</function> esempio</title> + <programlisting role="php"> + <![CDATA[ + <?php $tmpfname = tempnam("/tmp", "FOO"); + + $handle = fopen($tmpfname, "w"); + fwrite($handle, "writing to tempfile"); + fclose($handle); + + // do here something + + unlink($tmpfname); + ?> + ]]> + </programlisting> + </example> + </para> + <note> + <simpara> + Il funzionamento di questa funzione è cambiato nella 4.0.3. Il file temporaneo + è creato inoltre èer evitare un conflitto dove il file dovrebbe apparire + nel filesystem tra la volta in cui la stringa viene generata + e prima che lo script tenti di creare il file. Notare che se si necessita + cancellare il file, se non servisse più, non viene fatto + automaticamente. + </simpara> + </note> + <para> + Vedere anche <function>tmpfile</function> and <function>unlink</function>. + </para> + </refsect1> + </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml http://cvs.php.net/diff.php/phpdoc-it/reference/filesystem/functions/tmpfile.xml?r1=1.3&r2=1.4&ty=u Index: phpdoc-it/reference/filesystem/functions/tmpfile.xml diff -u phpdoc-it/reference/filesystem/functions/tmpfile.xml:1.3 phpdoc-it/reference/filesystem/functions/tmpfile.xml:1.4 --- phpdoc-it/reference/filesystem/functions/tmpfile.xml:1.3 Fri Feb 13 15:47:23 2004 +++ phpdoc-it/reference/filesystem/functions/tmpfile.xml Tue Dec 21 08:21:58 2004 @@ -1,66 +1,68 @@ -<?xml version="1.0" encoding="iso-8859-1"?> -<!-- splitted from ./it/functions/filesystem.xml, last change in rev 1.15 --> -<!-- EN-Revision: 1.4 Maintainer: cortesi Status: working --> - <refentry id="function.tmpfile"> - <refnamediv> - <refname>tmpfile</refname> - <refpurpose>Crea un file temporaneo</refpurpose> - </refnamediv> - <refsect1> - <title>Descrizione</title> - <methodsynopsis> - <type>resource</type><methodname>tmpfile</methodname> - <void/> - </methodsynopsis> - <para> - Crea un file temporaneo con un nome univoco il modalità di scrittura, - restituendo un riferimento al file simile a quello tornato da - <function>fopen</function>. - Il file viene automaticamente cancellato una volta chiuso (usando - <function>fclose</function>), o quando lo script termina. - </para> - <para> - Per dettagli, consulta la documentazione del tuo sistema sulla funzione - <literal>tmpfile(3)</literal>, così come il file haeader - <filename>stdio.h</filename>. - </para> - <para> - <example> - <title><function>tmpfile</function> example</title> - <programlisting role="php"> -<![CDATA[ - <?php -$temp = tmpfile(); -fwrite($temp, "writing to tempfile"); -fclose($temp); // this removes the file -?> -]]> - </programlisting> - </example> - </para> - <para> - Vedere anche <function>tempnam</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 ---> +<?xml version="1.0" encoding="iso-8859-1"?> +<!-- splitted from ./it/functions/filesystem.xml, last change in rev 1.32 --> +<!-- EN-Revision: 1.5 Maintainer: fernando Status: working --> + <refentry id="function.tmpfile"> + <refnamediv> + <refname>tmpfile</refname> + <refpurpose>Crea un file temporaneo</refpurpose> + </refnamediv> + <refsect1> + <title>Descrizione</title> + <methodsynopsis> + <type>resource</type><methodname>tmpfile</methodname> + <void/> + </methodsynopsis> + <para> Crea un file temporaneo con un nome univoco in modalità di lettura-scrittura (w+), + restituendo un riferimento al file simile a quello tornato da <function>fopen</function>. + Il file viene automaticamente cancellato una volta chiuso (usando + <function>fclose</function>), o quando lo script termina. + </para> + <para> Per dettagli, consulta la documentazione del tuo sistema sulla funzione + <literal>tmpfile(3)</literal>, così come il file haeader + <filename>stdio.h</filename>. + </para> + <para> + <example> + <title><function>tmpfile</function> example</title> + <programlisting role="php"> + <![CDATA[ + <?php + $temp = tmpfile(); + fwrite($temp, "writing to tempfile"); + fseek($temp, 0); + echo fread($temp, 1024); + fclose($temp); // this removes the file + ?> + ]]> + </programlisting> + &example.outputs; + <screen> + <![CDATA[ + writing toi tempfile + ]]> + </screen> + </example> + </para> + <para> Vedere anche <function>tempnam</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 + --> \ No newline at end of file http://cvs.php.net/diff.php/phpdoc-it/reference/filesystem/functions/touch.xml?r1=1.3&r2=1.4&ty=u Index: phpdoc-it/reference/filesystem/functions/touch.xml diff -u phpdoc-it/reference/filesystem/functions/touch.xml:1.3 phpdoc-it/reference/filesystem/functions/touch.xml:1.4 --- phpdoc-it/reference/filesystem/functions/touch.xml:1.3 Fri Feb 13 15:47:23 2004 +++ phpdoc-it/reference/filesystem/functions/touch.xml Tue Dec 21 08:21:58 2004 @@ -1,6 +1,7 @@ <?xml version="1.0" encoding="iso-8859-1"?> <!-- splitted from ./it/functions/filesystem.xml, last change in rev 1.15 --> -<!-- EN-Revision: 1.8 Maintainer: cortesi Status: working --> +<!-- EN-Revision: 1.9 Maintainer: fernando Status: working --> +<!-- CREDITS: cortesi --> <refentry id="function.touch"> <refnamediv> <refname>touch</refname> @@ -15,9 +16,9 @@ <methodparam choice="opt"><type>int</type><parameter>atime</parameter></methodparam> </methodsynopsis> <para> - Tenta di impostare l'ora di modifica del file indicato da filename - al valore dato da time. Se non viene passata l'opzione <parameter>time</parameter> - usa l'ora attuale. Questo equivale a quello che fa utime + Tenta di impostare l'ora di modifica del file indicato da + <parameter>filename</parameter>. Se il parametro <parameter>time</parameter> + non è passato, usa l'ora attuale. Ciò equivale a quello che fa utime (a volte indicato come utimes). Se è presente il terzo parametro opzionale <parameter>atime</parameter> è presente, viene utilizzato per impostare l'orario di accesso al file indicato. @@ -34,10 +35,9 @@ <![CDATA[ <?php if (touch($FileName)) { - echo "$FileName modification time has been - changed to todays date and time"; + echo "$FileName modification time has been changed to present time"; } else { - echo "Sorry Could Not change modification time of $FileName"; + echo "Sorry, could not change modification time of $FileName"; } ?> ]]> http://cvs.php.net/diff.php/phpdoc-it/reference/ftp/functions/ftp-pasv.xml?r1=1.2&r2=1.3&ty=u Index: phpdoc-it/reference/ftp/functions/ftp-pasv.xml diff -u phpdoc-it/reference/ftp/functions/ftp-pasv.xml:1.2 phpdoc-it/reference/ftp/functions/ftp-pasv.xml:1.3 --- phpdoc-it/reference/ftp/functions/ftp-pasv.xml:1.2 Wed Apr 17 03:06:46 2002 +++ phpdoc-it/reference/ftp/functions/ftp-pasv.xml Tue Dec 21 08:21:58 2004 @@ -1,29 +1,62 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- splitted from ./it/functions/ftp.xml, last change in rev 1.1 --> -<!-- last change to 'ftp-pasv' in en/ tree in rev 1.2 --> -<!-- EN-Revision: 1.2 Maintainer: colombo Status: working --> -<!-- OLD-Revision: 1.43/EN.1.2 --> +<!-- splitted from ./it/functions/ftp.xml, last change in rev 1.2 --> +<!-- last change to 'ftp-pasv' in en/ tree in rev 1.7 --> +<!-- EN-Revision: 1.5 Maintainer: afparam Status: ready --> +<!-- CREDITS: Colombo --> +<!-- OLD-Revision: 1.43/EN.1.7 --> <refentry id="function.ftp-pasv"> <refnamediv> <refname>ftp_pasv</refname> - <refpurpose>Abilita o disabilita la modalità passiva</refpurpose> + <refpurpose>Attivaa o disattiva il modo passivo</refpurpose> </refnamediv> <refsect1> <title>Descrizione</title> <methodsynopsis> - <type>int</type><methodname>ftp_pasv</methodname> - <methodparam><type>int</type><parameter>ftp_stream</parameter></methodparam> - <methodparam><type>int</type><parameter>pasv</parameter></methodparam> + <type>bool</type><methodname>ftp_pasv</methodname> + <methodparam><type>resource</type><parameter>ftp_stream</parameter></methodparam> + <methodparam><type>bool</type><parameter>pasv</parameter></methodparam> </methodsynopsis> <para> - <function>ftp_pasv</function>Abilita la modalità passiva se il parametro - <parameter>pasv</parameter> risulta &true; (disabilita la modalità - passiva se <parameter>pasv</parameter> risulta &false;.) In - modalità passiva la connessione viene iniziata dal client, + <function>ftp_pasv</function> attiva il modo passivo se + il parametro <parameter>pasv</parameter> e' &true;. Disattiva + il modo passivo se <parameter>pasv</parameter> e' &false;. Nel + modo passivo, le connessioni sono iniziate dal client piuttosto che dal server. </para> <para> - Restituisce &true; se a buon fine, &false; in caso di errore. + <example> + <title>Esempio di funzione <function>ftp_pasv</function></title> + <programlisting role="php"> +<![CDATA[ +<?php +$file = 'somefile.txt'; +$remote_file = 'readme.txt'; + +// stabilisce la connessione +$conn_id = ftp_connect($ftp_server); + +// si collega con username and password +$login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass); + +// attiva il modo passivo +ftp_pasv($conn_id, true); + +// trasferisce un file al server +if (ftp_put($conn_id, $remote_file, $file, FTP_ASCII)) { + echo "$file trasferito correttamente\n"; +} else { + echo "Si e' verificato un problema durante il trasferimento di $file\n"; +} + +// chiude la connessione +ftp_close($conn_id); +?> +]]> + </programlisting> + </example> + </para> + <para> + &return.success; </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc-it/reference/ftp/functions/ftp-put.xml?r1=1.2&r2=1.3&ty=u Index: phpdoc-it/reference/ftp/functions/ftp-put.xml diff -u phpdoc-it/reference/ftp/functions/ftp-put.xml:1.2 phpdoc-it/reference/ftp/functions/ftp-put.xml:1.3 --- phpdoc-it/reference/ftp/functions/ftp-put.xml:1.2 Wed Apr 17 03:06:46 2002 +++ phpdoc-it/reference/ftp/functions/ftp-put.xml Tue Dec 21 08:21:58 2004 @@ -1,41 +1,72 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- splitted from ./it/functions/ftp.xml, last change in rev 1.1 --> -<!-- last change to 'ftp-put' in en/ tree in rev 1.2 --> -<!-- EN-Revision: 1.2 Maintainer: colombo Status: working --> -<!-- OLD-Revision: 1.43/EN.1.2 --> +<!-- splitted from ./it/functions/ftp.xml, last change in rev 1.2 --> +<!-- last change to 'ftp-put' in en/ tree in rev 1.7 --> +<!-- EN-Revision: 1.7 Maintainer: afparam Status: ready --> +<!-- CREDITS: Colombo --> +<!-- OLD-Revision: 1.43/EN.1.7 --> + <refentry id="function.ftp-put"> <refnamediv> <refname>ftp_put</refname> - <refpurpose>Carica un file sul server FTP</refpurpose> + <refpurpose>Trasferisce un file al server FTP</refpurpose> </refnamediv> <refsect1> <title>Descrizione</title> <methodsynopsis> - <type>int</type><methodname>ftp_put</methodname> - <methodparam><type>int</type><parameter>ftp_stream</parameter></methodparam> + <type>bool</type><methodname>ftp_put</methodname> + <methodparam><type>resource</type><parameter>ftp_stream</parameter></methodparam> <methodparam><type>string</type><parameter>remote_file</parameter></methodparam> <methodparam><type>string</type><parameter>local_file</parameter></methodparam> <methodparam><type>int</type><parameter>mode</parameter></methodparam> + <methodparam choice="opt"><type>int</type><parameter>startpos</parameter></methodparam> </methodsynopsis> <para> <function>ftp_put</function> salva <parameter>local_file</parameter> - sul server FTP, come <parameter>remote_file</parameter>. Il parametro - <parameter>mode</parameter> che spedifica il tipo di trasferimento deve - essere <constant>FTP_ASCII</constant> oppure <constant>FTP_BINARY</constant>. + sul server FTP come <parameter>remote_file</parameter>. Il modo di trasferimento + <parameter>mode</parameter> specificato deve essere + <constant>FTP_ASCII</constant> oppure <constant>FTP_BINARY</constant>. </para> + <note> + <para> + Il parametro <parameter>startpos</parameter> e' stato aggiunto nella release PHP 4.3.0. + </para> + </note> <para> - Restituisce &true; se a buon fine, &false; in caso di errore. + &return.success; </para> <para> <example> - <title>Esempio di <function>ftp_put</function></title> + <title>Esempio di funzione <function>ftp_put</function></title> <programlisting role="php"> <![CDATA[ -$upload = ftp_put ($conn_id, $destination_file, $source_file, FTP_ASCII); +<?php +$file = 'somefile.txt'; +$remote_file = 'readme.txt'; + +// stabilisce la connessione +$conn_id = ftp_connect($ftp_server); + +// si collega con username and password +$login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass); + +// trasferisce un file al server +if (ftp_put($conn_id, $remote_file, $file, FTP_ASCII)) { + echo "$file trasferito correttamente\n"; +} else { + echo "Si e' verificato un problema durante il trasferimento di $file\n"; +} + +// chiude la connessione +ftp_close($conn_id); +?> ]]> </programlisting> </example> </para> + <para> + Vedere anche <function>ftp_fput</function>, <function>ftp_nb_fput</function>, + e <function>ftp_nb_put</function>. + </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc-it/reference/ftp/functions/ftp-pwd.xml?r1=1.2&r2=1.3&ty=u Index: phpdoc-it/reference/ftp/functions/ftp-pwd.xml diff -u phpdoc-it/reference/ftp/functions/ftp-pwd.xml:1.2 phpdoc-it/reference/ftp/functions/ftp-pwd.xml:1.3 --- phpdoc-it/reference/ftp/functions/ftp-pwd.xml:1.2 Wed Apr 17 03:06:47 2002 +++ phpdoc-it/reference/ftp/functions/ftp-pwd.xml Tue Dec 21 08:21:58 2004 @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- splitted from ./it/functions/ftp.xml, last change in rev 1.1 --> -<!-- last change to 'ftp-pwd' in en/ tree in rev 1.2 --> -<!-- EN-Revision: 1.2 Maintainer: colombo Status: working --> -<!-- OLD-Revision: 1.43/EN.1.2 --> +<!-- splitted from ./it/functions/ftp.xml, last change in rev 1.2 --> +<!-- last change to 'ftp-pwd' in en/ tree in rev 1.7 --> +<!-- EN-Revision: 1.4 Maintainer: afparam Status: ready --> +<!-- CREDITS: Colombo --> +<!-- OLD-Revision: 1.43/EN.1.7 --> + <refentry id="function.ftp-pwd"> <refnamediv> <refname>ftp_pwd</refname> @@ -12,10 +14,36 @@ <title>Descrizione</title> <methodsynopsis> <type>string</type><methodname>ftp_pwd</methodname> - <methodparam><type>int</type><parameter>ftp_stream</parameter></methodparam> + <methodparam><type>resource</type><parameter>ftp_stream</parameter></methodparam> </methodsynopsis> <para> - Restituisce il nome della directory corrente, oppure &false; in caso di errore. + Restituisce la directory corrente oppure &false; in caso di errore. + </para> + <para> + <example> + <title>Esempio di funzione <function>ftp_pwd</function></title> + <programlisting role="php"> +<![CDATA[ +<?php + +// stabilisce la connessione +$conn_id = ftp_connect($ftp_server); + +// si collega con username and password +$login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass); + +// si sposta sulla directory public_html +ftp_chdir($conn_id, 'public_html'); + +// stampa la directory corrente +echo ftp_pwd($conn_id); // /public_html + +// chiude la connessione +ftp_close($conn_id); +?> +]]> + </programlisting> + </example> </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc-it/reference/ftp/functions/ftp-quit.xml?r1=1.2&r2=1.3&ty=u Index: phpdoc-it/reference/ftp/functions/ftp-quit.xml diff -u phpdoc-it/reference/ftp/functions/ftp-quit.xml:1.2 phpdoc-it/reference/ftp/functions/ftp-quit.xml:1.3 --- phpdoc-it/reference/ftp/functions/ftp-quit.xml:1.2 Wed Apr 17 03:06:47 2002 +++ phpdoc-it/reference/ftp/functions/ftp-quit.xml Tue Dec 21 08:21:58 2004 @@ -1,22 +1,19 @@ <?xml version="1.0" encoding="iso-8859-1"?> <!-- splitted from ./it/functions/ftp.xml, last change in rev 1.1 --> -<!-- last change to 'ftp-quit' in en/ tree in rev 1.2 --> -<!-- EN-Revision: 1.2 Maintainer: colombo Status: working --> -<!-- OLD-Revision: 1.43/EN.1.2 --> +<!-- last change to 'ftp-quit' in en/ tree in rev 1.7 --> +<!-- EN-Revision: 1.3 Maintainer: afparam Status: ready --> +<!-- CREDITS: Colombo --> +<!-- OLD-Revision: 1.43/EN.1.7 --> + <refentry id="function.ftp-quit"> <refnamediv> <refname>ftp_quit</refname> - <refpurpose>Chiude una connessione FTP</refpurpose> + <refpurpose>Alias di <function>ftp_close</function></refpurpose> </refnamediv> <refsect1> <title>Descrizione</title> - <methodsynopsis> - <type>int</type><methodname>ftp_quit</methodname> - <methodparam><type>int</type><parameter>ftp_stream</parameter></methodparam> - </methodsynopsis> <para> - <function>ftp_quit</function> chiude - <parameter>ftp_stream</parameter>. + Questa funzione e' un alias di <function>ftp_close</function>. </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc-it/reference/ftp/functions/ftp-rawlist.xml?r1=1.2&r2=1.3&ty=u Index: phpdoc-it/reference/ftp/functions/ftp-rawlist.xml diff -u phpdoc-it/reference/ftp/functions/ftp-rawlist.xml:1.2 phpdoc-it/reference/ftp/functions/ftp-rawlist.xml:1.3 --- phpdoc-it/reference/ftp/functions/ftp-rawlist.xml:1.2 Wed Apr 17 03:06:47 2002 +++ phpdoc-it/reference/ftp/functions/ftp-rawlist.xml Tue Dec 21 08:21:58 2004 @@ -1,26 +1,72 @@ <?xml version="1.0" encoding="iso-8859-1"?> <!-- splitted from ./it/functions/ftp.xml, last change in rev 1.1 --> -<!-- last change to 'ftp-rawlist' in en/ tree in rev 1.2 --> -<!-- EN-Revision: 1.2 Maintainer: colombo Status: working --> -<!-- OLD-Revision: 1.43/EN.1.2 --> +<!-- last change to 'ftp-rawlist' in en/ tree in rev 1.7 --> +<!-- EN-Revision: 1.4 Maintainer: afparam Status: ready --> +<!-- CREDITS: Colombo --> +<!-- OLD-Revision: 1.43/EN.1.7 --> + <refentry id="function.ftp-rawlist"> <refnamediv> <refname>ftp_rawlist</refname> - <refpurpose>Restituisce l'elenco dettagliato dei file in una data directory</refpurpose> + <refpurpose>Restituisce un elenco dettagliato dei files nella directory in esame</refpurpose> </refnamediv> <refsect1> <title>Descrizione</title> <methodsynopsis> <type>array</type><methodname>ftp_rawlist</methodname> - <methodparam><type>int</type><parameter>ftp_stream</parameter></methodparam> + <methodparam><type>resource</type><parameter>ftp_stream</parameter></methodparam> <methodparam><type>string</type><parameter>directory</parameter></methodparam> </methodsynopsis> <para> - <function>ftp_rawlist</function> esegue il comando FTP LIST - e restituisce il risultato come un array. Ogni elemento dell'array corrisponde - ad una linea di testo. L'output non viene in alcun modo interpretato. - L'identificatore del tipo di sistema restituito da <function>ftp_systype</function> - può essere usato per determinare l'interpretazione del risultato. + <function>ftp_rawlist</function> esegue il comando FTP LIST, + e restituisce il risultato sotto forma di array. Ogni elemento dell'array corrisponde + ad una linea di testo. Sull'output non viene eseguito parsing. + L'identificatore di tipo di sistema restituito da <function>ftp_systype</function> + puo' essere utilizzato per interpretare il risultato. + </para> + <para> + <example> + <title>Esempio di funzione <function>ftp_rawlist</function></title> + <programlisting role="php"> +<![CDATA[ +<?php + +// stabilisce la connessione +$conn_id = ftp_connect($ftp_server); + +// si collega con username and password +$login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass); + +// ottiene l'elenco dei files di / +$buff = ftp_rawlist($conn_id, '/'); + +// chiude la connessione +ftp_close($conn_id); + +// visualizza il contenuto del buffer +var_dump($buff); +?> +]]> + </programlisting> + <para> + L'esempio precedente produrra' qualcosa di simile a: + </para> + <screen> +<![CDATA[ +array(3) { + [0]=> + string(65) "drwxr-x--- 3 vincent vincent 4096 Jul 12 12:16 public_ftp" + [1]=> + string(66) "drwxr-x--- 15 vincent vincent 4096 Nov 3 21:31 public_html" + [2]=> + string(73) "lrwxrwxrwx 1 vincent vincent 11 Jul 12 12:16 www -> public_html" +} +]]> + </screen> + </example> + </para> + <para> + Vedere anche <function>ftp_nlist</function>. </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc-it/reference/ftp/functions/ftp-rename.xml?r1=1.2&r2=1.3&ty=u Index: phpdoc-it/reference/ftp/functions/ftp-rename.xml diff -u phpdoc-it/reference/ftp/functions/ftp-rename.xml:1.2 phpdoc-it/reference/ftp/functions/ftp-rename.xml:1.3 --- phpdoc-it/reference/ftp/functions/ftp-rename.xml:1.2 Wed Apr 17 03:06:47 2002 +++ phpdoc-it/reference/ftp/functions/ftp-rename.xml Tue Dec 21 08:21:58 2004 @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="iso-8859-1"?> <!-- splitted from ./it/functions/ftp.xml, last change in rev 1.1 --> -<!-- last change to 'ftp-rename' in en/ tree in rev 1.2 --> -<!-- EN-Revision: 1.2 Maintainer: colombo Status: working --> -<!-- OLD-Revision: 1.43/EN.1.2 --> +<!-- last change to 'ftp-rename' in en/ tree in rev 1.7 --> +<!-- EN-Revision: 1.5 Maintainer: afparam Status: ready --> +<!-- CREDITS: Colombo --> +<!-- OLD-Revision: 1.43/EN.1.7 --> + <refentry id="function.ftp-rename"> <refnamediv> <refname>ftp_rename</refname> @@ -11,19 +13,48 @@ <refsect1> <title>Descrizione</title> <methodsynopsis> - <type>boolean</type><methodname>ftp_rename</methodname> + <type>bool</type><methodname>ftp_rename</methodname> <methodparam><type>resource</type><parameter>ftp_stream</parameter></methodparam> - <methodparam><type>string</type><parameter>da</parameter></methodparam> - <methodparam><type>string</type><parameter>a</parameter></methodparam> + <methodparam><type>string</type><parameter>from</parameter></methodparam> + <methodparam><type>string</type><parameter>to</parameter></methodparam> </methodsynopsis> <para> - <function>ftp_rename</function> rinomina il file o la cartella - che ha come nome corrente <parameter>da</parameter> con il nome - <parameter>a</parameter>, sul flusso FTP + <function>ftp_rename</function> rinomina il file o la directory il cui + nome corrente e' <parameter>from</parameter> con il nome + <parameter>to</parameter>, utilizzando lo stream FTP <parameter>ftp_stream</parameter>. </para> <para> - Restituisce &true; se a buon fine, &false; in caso di errore. + <example> + <title>Esempio di funzione <function>ftp_rename</function></title> + <programlisting role="php"> +<![CDATA[ +<?php +$old_file = 'somefile.txt.bak'; +$new_file = 'somefile.txt'; + +// stabilisce la connessione +$conn_id = ftp_connect($ftp_server); + +// si collega con username and password +$login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass); + +// prova a cambiare il nome $old_file nel nome $new_file +if (ftp_rename($conn_id, $old_file, $new_file)) { + echo "cambiamento nome da $old_file a $new_file effettuato\n"; +} else { + echo "Si e' verificato un problema durante il cambiamento di nome da $old_file a $new_file\n"; +} + +// chiude la connessione +ftp_close($conn_id); +?> +]]> + </programlisting> + </example> + </para> + <para> + &return.success; </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc-it/reference/ftp/functions/ftp-rmdir.xml?r1=1.2&r2=1.3&ty=u Index: phpdoc-it/reference/ftp/functions/ftp-rmdir.xml diff -u phpdoc-it/reference/ftp/functions/ftp-rmdir.xml:1.2 phpdoc-it/reference/ftp/functions/ftp-rmdir.xml:1.3 --- phpdoc-it/reference/ftp/functions/ftp-rmdir.xml:1.2 Wed Apr 17 03:06:47 2002 +++ phpdoc-it/reference/ftp/functions/ftp-rmdir.xml Tue Dec 21 08:21:58 2004 @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="iso-8859-1"?> <!-- splitted from ./it/functions/ftp.xml, last change in rev 1.1 --> -<!-- last change to 'ftp-rmdir' in en/ tree in rev 1.2 --> -<!-- EN-Revision: 1.2 Maintainer: colombo Status: working --> -<!-- OLD-Revision: 1.43/EN.1.2 --> +<!-- last change to 'ftp-rmdir' in en/ tree in rev 1.7 --> +<!-- EN-Revision: 1.7 Maintainer: afparam Status: ready --> +<!-- CREDITS: Colombo --> +<!-- OLD-Revision: 1.43/EN.1.7 --> + <refentry id="function.ftp-rmdir"> <refnamediv> <refname>ftp_rmdir</refname> @@ -11,15 +13,50 @@ <refsect1> <title>Descrizione</title> <methodsynopsis> - <type>int</type><methodname>ftp_rmdir</methodname> - <methodparam><type>int</type><parameter>ftp_stream</parameter></methodparam> + <type>bool</type><methodname>ftp_rmdir</methodname> + <methodparam><type>resource</type><parameter>ftp_stream</parameter></methodparam> <methodparam><type>string</type><parameter>directory</parameter></methodparam> </methodsynopsis> <para> Elimina la <parameter>directory</parameter> specificata. + <parameter>directory</parameter> deve essere un percorso + assoluto o relativo ad una directory vuota. + </para> + <para> + &return.success; + </para> + <para> + <example> + <title>Esempio di funzione <function>ftp_rmdir</function></title> + <programlisting role="php"> +<![CDATA[ +<?php + +$dir = 'www/'; + +// stabilisce la connesione +$conn_id = ftp_connect($ftp_server); + +// si collega con username and password +$login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass); + +// prova a eliminare la directory $dir +if (ftp_rmdir($conn_id, $dir)) { + echo "Directory $dir eliminata\n"; +} else { + echo "Si e' verificato un problema durante l'eliminazione di $dir\n"; +} + +ftp_close($conn_id); + +?> +]]> + </programlisting> + </example> </para> <para> - Restituisce &true; in caso di successo, &false; in caso di errore.</para> + Vedere anche <function>ftp_mkdir</function>. + </para> </refsect1> </refentry>