cvs: phpdoc-nl /reference/ftp/functions ftp-async-continue.xml ftp-async-fget.xml ftp-async-fput.xml ftp-async-get.xml ftp-async-put.xml
ftp-nb-continue.xml ftp-nb-fget.xml ftp-nb-fput.xml ftp-nb-get.xml ftp-nb-put.xml
| From: | Patric Stout | Date: | Wed, 08 Jan 2003 21:03:12 +0000 |
| Subject: | cvs: phpdoc-nl /reference/ftp/functions ftp-async-continue.xml ftp-async-fget.xml ftp-async-fput.xml ftp-async-get.xml ftp-async-put.xml ftp-nb-continue.xml ftp-nb-fget.xml ftp-nb-fput.xml ftp-nb-get.xml ftp-nb-put.xml |
||
| Groups: | php.doc.nl | ||
| Request: | Send a blank email to doc-nl+get-217@lists.php.net to get a copy of this message | ||
truelight Wed Jan 8 16:03:12 2003 EDT
Added files:
/phpdoc-nl/reference/ftp/functions ftp-nb-continue.xml
ftp-nb-fget.xml ftp-nb-fput.xml
ftp-nb-get.xml ftp-nb-put.xml
Removed files:
/phpdoc-nl/reference/ftp/functions ftp-async-continue.xml
ftp-async-fget.xml
ftp-async-fput.xml
ftp-async-get.xml
ftp-async-put.xml
Log:
async is nb geworden
Sync with EN
Index: phpdoc-nl/reference/ftp/functions/ftp-nb-continue.xml +++ phpdoc-nl/reference/ftp/functions/ftp-nb-continue.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- EN-Revision: 1.2 Maintainer: truelight Status: ready --> <refentry id="function.ftp-nb-continue"> <refnamediv> <refname>ftp_nb_continue</refname> <refpurpose>Vervolgt het zenden/ontvangen van een bestand (non-blocking)</refpurpose> </refnamediv> <refsect1> <title>Beschrijving</title> <methodsynopsis> <type>bool</type><methodname>ftp_nb_continue</methodname> <methodparam><type>resource</type><parameter>ftp_stream</parameter></methodparam> </methodsynopsis> <para> Vervolgt het zenden/ontvangen van een bestand (non-blocking) </para> <para> Geeft <constant>FTP_FAILED</constant> of <constant>FTP_FINISHED</constant> of <constant>FTP_MOREDATA</constant> terug. </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 --> Index: phpdoc-nl/reference/ftp/functions/ftp-nb-fget.xml +++ phpdoc-nl/reference/ftp/functions/ftp-nb-fget.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- EN-Revision: 1.3 Maintainer: truelight Status: ready --> <refentry id="function.ftp-nb-fget"> <refnamediv> <refname>ftp_nb_fget</refname> <refpurpose>Ontvangt een bestand van de FTP server en schrijft het naar een open bestand (non-blocking)</refpurpose> </refnamediv> <refsect1> <title>Beschrijving</title> <methodsynopsis> <type>bool</type><methodname>ftp_nb_fget</methodname> <methodparam><type>resource</type><parameter>ftp_stream</parameter></methodparam> <methodparam><type>resource</type><parameter>fp</parameter></methodparam> <methodparam><type>string</type><parameter>remote_file</parameter></methodparam> <methodparam><type>int</type><parameter>mode</parameter></methodparam> <methodparam choice="opt"><type>int</type><parameter>resumepos</parameter></methodparam> </methodsynopsis> <para> <function>ftp_nb_fget</function> ontvangt <parameter>remote_file</parameter> van de FTP server, en schrijft het naar de opgegeven bestands pointer <parameter>fp</parameter>. De overdracht <parameter>mode</parameter> moet of <constant>FTP_ASCII</constant> of <constant>FTP_BINARY</constant> zijn. Het verschil met <function>ftp_fget</function> is, dat deze functie het bestand asynchroon ontvangt, zodat je andere dingen kan doen in je programma terwijl het bestand wordt gedownload. </para> <para> &return.success; </para> <para> Zie ook <function>ftp_nb_get</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 --> Index: phpdoc-nl/reference/ftp/functions/ftp-nb-fput.xml +++ phpdoc-nl/reference/ftp/functions/ftp-nb-fput.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- EN-Revision: 1.3 Maintainer: truelight Status: ready --> <refentry id="function.ftp-nb-fput"> <refnamediv> <refname>ftp_nb_fput</refname> <refpurpose>Schrijft een bestand van een open bestands pointer naar de FTP server (non-blocking)</refpurpose> </refnamediv> <refsect1> <title>Beschrijving</title> <methodsynopsis> <type>bool</type><methodname>ftp_nb_fput</methodname> <methodparam><type>resource</type><parameter>ftp_stream</parameter></methodparam> <methodparam><type>string</type><parameter>remote_file</parameter></methodparam> <methodparam><type>resource</type><parameter>fp</parameter></methodparam> <methodparam><type>int</type><parameter>mode</parameter></methodparam> <methodparam choice="opt"><type>int</type><parameter>startpos</parameter></methodparam> </methodsynopsis> <para> <function>ftp_nb_fput</function> upload de data van de bestands pointer <parameter>fp</parameter> tot het einde van het bestand. De data wordt opgeslagen in <parameter>remote_file</parameter> op de FTP server. De overdracht <parameter>mode</parameter> moet of <constant>FTP_ASCII</constant> of <constant>FTP_BINARY</constant>. Het verschil met <function>ftp_fput</function> is dat deze functie het bestand asynchroon upload, zodat je andere dingen kan doen in je programma terwijl het bestand wordt geupload. </para> <para> &return.success; </para> <para> Zie ook <function>ftp_nb_put</function>, <function>ftp_nb_continue</function>, <function>ftp_put</function> en <function>ftp_fput</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 --> Index: phpdoc-nl/reference/ftp/functions/ftp-nb-get.xml +++ phpdoc-nl/reference/ftp/functions/ftp-nb-get.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- EN-Revision: 1.3 Maintainer: truelight Status: ready --> <refentry id="function.ftp-nb-get"> <refnamediv> <refname>ftp_nb_get</refname> <refpurpose>Ontvangt een bestand van de FTP server en schrijft het naar een lokaal bestand (non-blocking)</refpurpose> </refnamediv> <refsect1> <title>Beschrijving</title> <methodsynopsis> <type>bool</type><methodname>ftp_nb_get</methodname> <methodparam><type>resource</type><parameter>ftp_stream</parameter></methodparam> <methodparam><type>string</type><parameter>local_file</parameter></methodparam> <methodparam><type>string</type><parameter>remote_file</parameter></methodparam> <methodparam><type>int</type><parameter>mode</parameter></methodparam> <methodparam choice="opt"><type>int</type><parameter>resumepos</parameter></methodparam> </methodsynopsis> <para> <function>ftp_nb_get</function> ontvangt <parameter>remote_file</parameter> van de FTP server, en slaat het lokaal op in <parameter>local_file</parameter>. De overdracht <parameter>mode</parameter> moet of <constant>FTP_ASCII</constant> of <constant>FTP_BINARY</constant> zijn. Het verschil met <function>ftp_fget</function> is, dat deze functie het bestand asynchroon ontvangt, zodat je andere dingen kan doen in je programma terwijl het bestand wordt gedownload. </para> <para> &return.success; </para> <para> <example> <title><function>ftp_nb_get</function> voorbeeld</title> <programlisting role="php"> <![CDATA[ // Initializeer de download $ret = ftp_nb_get($my_connection, "test", "README", FTP_BINARY); while ($ret == FTP_MOREDATA) { // Doe wat je ook maar wil echo "."; // Ga door met downloaden... $ret = ftp_nb_continue ($my_connection); } if ($ret != FTP_FINISHED) { echo "Er was een fout met het downloaden van het bestand..."; exit(1); } ]]> </programlisting> </example> <example> <title>Een download met <function>ftp_nb_get</function> afmaken</title> <programlisting role="php"> <![CDATA[ // Initialiseer $ret = ftp_nb_get ($my_connection, "test", "README", FTP_BINARY, filesize("test")); // OF: $ret = ftp_nb_get ($my_connection, "test", "README", // FTP_BINARY, FTP_AUTORESUME); while ($ret == FTP_MOREDATA) { //Doe wat je ook maar wil echo "."; // Ga door met downloaden... $ret = ftp_nb_continue ($my_connection); } if ($ret != FTP_FINISHED) { echo "Er was een fout met het downloaden van het bestand..."; exit(1); } ]]> </programlisting> </example> <example> <title> Zet een download op positie 100 voort naar een nieuw bestand met <function>ftp_nb_get</function> </title> <programlisting role="php"> <![CDATA[ // Zet autoseek uit ftp_set_option ($my_connection, FTP_AUTOSEEK, FALSE); // Initializeren $ret = ftp_nb_get ($my_connection, "newfile", "README", FTP_BINARY, 100); while ($ret == FTP_MOREDATA) { ... // Ga door met downloaden... $ret = ftp_nb_continue ($my_connection); } ]]> </programlisting> </example> </para> <para> In het bovenstaande voorbeeld is <filename>"newfile"</filename> 100 bytes kleiner dan <filename>"README"</filename> op de FTP server, omdat we starten met lezen op positie 100. Als we niet <constant>FTP_AUTOSEEK</constant> hadden uitgezet waren de eerste 100 bytes van het nieuwe bestand <literal>'\0'</literal> </para> <para> Zie ook <function>ftp_nb_fget</function>, <function>ftp_nb_continue</function>, <function>ftp_get</function> en <function>ftp_fget</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 --> Index: phpdoc-nl/reference/ftp/functions/ftp-nb-put.xml +++ phpdoc-nl/reference/ftp/functions/ftp-nb-put.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- EN-Revision: 1.3 Maintainer: truelight Status: ready --> <refentry id="function.ftp-nb-put"> <refnamediv> <refname>ftp_nb_put</refname> <refpurpose>Slaat een bestand op de FTP server op (non-blocking)</refpurpose> </refnamediv> <refsect1> <title>Beschrijving</title> <methodsynopsis> <type>bool</type><methodname>ftp_nb_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_nb_put</function> slaat <parameter>local_file</parameter> op de FTP server op als <parameter>remote_file</parameter>. De overdracht <parameter>mode</parameter> moet of <constant>FTP_ASCII</constant> of <constant>FTP_BINARY</constant>. Het verschil met <function>ftp_fput</function> is dat deze functie het bestand asynchroon upload, zodat je andere dingen kan doen in je programma terwijl het bestand wordt geupload. </para> <para> &return.success; </para> <para> <example> <title><function>ftp_nb_put</function> voorbeeld</title> <programlisting role="php"> <![CDATA[ // Initialiseer de upload $ret = ftp_nb_put($my_connection, "test.remote", "test.local", FTP_BINARY); while ($ret == FTP_MOREDATA) { // Doe wat je ook maar wil doen echo "."; // Ga door met downloaden... $ret = ftp_nb_continue ($my_connection); } if ($ret != FTP_FINISHED) { echo "Er was een fout met het uploaden van het bestand..."; exit(1); } ]]> </programlisting> </example> <example> <title>Een download met <function>ftp_nb_put</function> afmaken</title> <programlisting role="php"> <![CDATA[ // Initialiseer $ret = ftp_nb_put ($my_connection, "test.remote", "test.local", FTP_BINARY, ftp_size("test.remote")); // OF: $ret = ftp_nb_put ($my_connection, "test.remote", "test.local", // FTP_BINARY, FTP_AUTORESUME); while ($ret == FTP_MOREDATA) { //Doe wat je ook maar wil echo "."; // Ga door met downloaden... $ret = ftp_nb_continue ($my_connection); } if ($ret != FTP_FINISHED) { echo "Er was een fout met het uploaden van het bestand..."; exit(1); } ]]> </programlisting> </example> </para> <para> Zie ook <function>ftp_nb_fput</function>, <function>ftp_nb_continue</function>, <function>ftp_put</function> en <function>ftp_fput</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 -->
Index: phpdoc-nl/reference/ftp/functions/ftp-nb-continue.xml +++ phpdoc-nl/reference/ftp/functions/ftp-nb-continue.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- EN-Revision: 1.2 Maintainer: truelight Status: ready --> <refentry id="function.ftp-nb-continue"> <refnamediv> <refname>ftp_nb_continue</refname> <refpurpose>Vervolgt het zenden/ontvangen van een bestand (non-blocking)</refpurpose> </refnamediv> <refsect1> <title>Beschrijving</title> <methodsynopsis> <type>bool</type><methodname>ftp_nb_continue</methodname> <methodparam><type>resource</type><parameter>ftp_stream</parameter></methodparam> </methodsynopsis> <para> Vervolgt het zenden/ontvangen van een bestand (non-blocking) </para> <para> Geeft <constant>FTP_FAILED</constant> of <constant>FTP_FINISHED</constant> of <constant>FTP_MOREDATA</constant> terug. </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 --> Index: phpdoc-nl/reference/ftp/functions/ftp-nb-fget.xml +++ phpdoc-nl/reference/ftp/functions/ftp-nb-fget.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- EN-Revision: 1.3 Maintainer: truelight Status: ready --> <refentry id="function.ftp-nb-fget"> <refnamediv> <refname>ftp_nb_fget</refname> <refpurpose>Ontvangt een bestand van de FTP server en schrijft het naar een open bestand (non-blocking)</refpurpose> </refnamediv> <refsect1> <title>Beschrijving</title> <methodsynopsis> <type>bool</type><methodname>ftp_nb_fget</methodname> <methodparam><type>resource</type><parameter>ftp_stream</parameter></methodparam> <methodparam><type>resource</type><parameter>fp</parameter></methodparam> <methodparam><type>string</type><parameter>remote_file</parameter></methodparam> <methodparam><type>int</type><parameter>mode</parameter></methodparam> <methodparam choice="opt"><type>int</type><parameter>resumepos</parameter></methodparam> </methodsynopsis> <para> <function>ftp_nb_fget</function> ontvangt <parameter>remote_file</parameter> van de FTP server, en schrijft het naar de opgegeven bestands pointer <parameter>fp</parameter>. De overdracht <parameter>mode</parameter> moet of <constant>FTP_ASCII</constant> of <constant>FTP_BINARY</constant> zijn. Het verschil met <function>ftp_fget</function> is, dat deze functie het bestand asynchroon ontvangt, zodat je andere dingen kan doen in je programma terwijl het bestand wordt gedownload. </para> <para> &return.success; </para> <para> Zie ook <function>ftp_nb_get</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 --> Index: phpdoc-nl/reference/ftp/functions/ftp-nb-fput.xml +++ phpdoc-nl/reference/ftp/functions/ftp-nb-fput.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- EN-Revision: 1.3 Maintainer: truelight Status: ready --> <refentry id="function.ftp-nb-fput"> <refnamediv> <refname>ftp_nb_fput</refname> <refpurpose>Schrijft een bestand van een open bestands pointer naar de FTP server (non-blocking)</refpurpose> </refnamediv> <refsect1> <title>Beschrijving</title> <methodsynopsis> <type>bool</type><methodname>ftp_nb_fput</methodname> <methodparam><type>resource</type><parameter>ftp_stream</parameter></methodparam> <methodparam><type>string</type><parameter>remote_file</parameter></methodparam> <methodparam><type>resource</type><parameter>fp</parameter></methodparam> <methodparam><type>int</type><parameter>mode</parameter></methodparam> <methodparam choice="opt"><type>int</type><parameter>startpos</parameter></methodparam> </methodsynopsis> <para> <function>ftp_nb_fput</function> upload de data van de bestands pointer <parameter>fp</parameter> tot het einde van het bestand. De data wordt opgeslagen in <parameter>remote_file</parameter> op de FTP server. De overdracht <parameter>mode</parameter> moet of <constant>FTP_ASCII</constant> of <constant>FTP_BINARY</constant>. Het verschil met <function>ftp_fput</function> is dat deze functie het bestand asynchroon upload, zodat je andere dingen kan doen in je programma terwijl het bestand wordt geupload. </para> <para> &return.success; </para> <para> Zie ook <function>ftp_nb_put</function>, <function>ftp_nb_continue</function>, <function>ftp_put</function> en <function>ftp_fput</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 --> Index: phpdoc-nl/reference/ftp/functions/ftp-nb-get.xml +++ phpdoc-nl/reference/ftp/functions/ftp-nb-get.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- EN-Revision: 1.3 Maintainer: truelight Status: ready --> <refentry id="function.ftp-nb-get"> <refnamediv> <refname>ftp_nb_get</refname> <refpurpose>Ontvangt een bestand van de FTP server en schrijft het naar een lokaal bestand (non-blocking)</refpurpose> </refnamediv> <refsect1> <title>Beschrijving</title> <methodsynopsis> <type>bool</type><methodname>ftp_nb_get</methodname> <methodparam><type>resource</type><parameter>ftp_stream</parameter></methodparam> <methodparam><type>string</type><parameter>local_file</parameter></methodparam> <methodparam><type>string</type><parameter>remote_file</parameter></methodparam> <methodparam><type>int</type><parameter>mode</parameter></methodparam> <methodparam choice="opt"><type>int</type><parameter>resumepos</parameter></methodparam> </methodsynopsis> <para> <function>ftp_nb_get</function> ontvangt <parameter>remote_file</parameter> van de FTP server, en slaat het lokaal op in <parameter>local_file</parameter>. De overdracht <parameter>mode</parameter> moet of <constant>FTP_ASCII</constant> of <constant>FTP_BINARY</constant> zijn. Het verschil met <function>ftp_fget</function> is, dat deze functie het bestand asynchroon ontvangt, zodat je andere dingen kan doen in je programma terwijl het bestand wordt gedownload. </para> <para> &return.success; </para> <para> <example> <title><function>ftp_nb_get</function> voorbeeld</title> <programlisting role="php"> <![CDATA[ // Initializeer de download $ret = ftp_nb_get($my_connection, "test", "README", FTP_BINARY); while ($ret == FTP_MOREDATA) { // Doe wat je ook maar wil echo "."; // Ga door met downloaden... $ret = ftp_nb_continue ($my_connection); } if ($ret != FTP_FINISHED) { echo "Er was een fout met het downloaden van het bestand..."; exit(1); } ]]> </programlisting> </example> <example> <title>Een download met <function>ftp_nb_get</function> afmaken</title> <programlisting role="php"> <![CDATA[ // Initialiseer $ret = ftp_nb_get ($my_connection, "test", "README", FTP_BINARY, filesize("test")); // OF: $ret = ftp_nb_get ($my_connection, "test", "README", // FTP_BINARY, FTP_AUTORESUME); while ($ret == FTP_MOREDATA) { //Doe wat je ook maar wil echo "."; // Ga door met downloaden... $ret = ftp_nb_continue ($my_connection); } if ($ret != FTP_FINISHED) { echo "Er was een fout met het downloaden van het bestand..."; exit(1); } ]]> </programlisting> </example> <example> <title> Zet een download op positie 100 voort naar een nieuw bestand met <function>ftp_nb_get</function> </title> <programlisting role="php"> <![CDATA[ // Zet autoseek uit ftp_set_option ($my_connection, FTP_AUTOSEEK, FALSE); // Initializeren $ret = ftp_nb_get ($my_connection, "newfile", "README", FTP_BINARY, 100); while ($ret == FTP_MOREDATA) { ... // Ga door met downloaden... $ret = ftp_nb_continue ($my_connection); } ]]> </programlisting> </example> </para> <para> In het bovenstaande voorbeeld is <filename>"newfile"</filename> 100 bytes kleiner dan <filename>"README"</filename> op de FTP server, omdat we starten met lezen op positie 100. Als we niet <constant>FTP_AUTOSEEK</constant> hadden uitgezet waren de eerste 100 bytes van het nieuwe bestand <literal>'\0'</literal> </para> <para> Zie ook <function>ftp_nb_fget</function>, <function>ftp_nb_continue</function>, <function>ftp_get</function> en <function>ftp_fget</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 --> Index: phpdoc-nl/reference/ftp/functions/ftp-nb-put.xml +++ phpdoc-nl/reference/ftp/functions/ftp-nb-put.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- EN-Revision: 1.3 Maintainer: truelight Status: ready --> <refentry id="function.ftp-nb-put"> <refnamediv> <refname>ftp_nb_put</refname> <refpurpose>Slaat een bestand op de FTP server op (non-blocking)</refpurpose> </refnamediv> <refsect1> <title>Beschrijving</title> <methodsynopsis> <type>bool</type><methodname>ftp_nb_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_nb_put</function> slaat <parameter>local_file</parameter> op de FTP server op als <parameter>remote_file</parameter>. De overdracht <parameter>mode</parameter> moet of <constant>FTP_ASCII</constant> of <constant>FTP_BINARY</constant>. Het verschil met <function>ftp_fput</function> is dat deze functie het bestand asynchroon upload, zodat je andere dingen kan doen in je programma terwijl het bestand wordt geupload. </para> <para> &return.success; </para> <para> <example> <title><function>ftp_nb_put</function> voorbeeld</title> <programlisting role="php"> <![CDATA[ // Initialiseer de upload $ret = ftp_nb_put($my_connection, "test.remote", "test.local", FTP_BINARY); while ($ret == FTP_MOREDATA) { // Doe wat je ook maar wil doen echo "."; // Ga door met downloaden... $ret = ftp_nb_continue ($my_connection); } if ($ret != FTP_FINISHED) { echo "Er was een fout met het uploaden van het bestand..."; exit(1); } ]]> </programlisting> </example> <example> <title>Een download met <function>ftp_nb_put</function> afmaken</title> <programlisting role="php"> <![CDATA[ // Initialiseer $ret = ftp_nb_put ($my_connection, "test.remote", "test.local", FTP_BINARY, ftp_size("test.remote")); // OF: $ret = ftp_nb_put ($my_connection, "test.remote", "test.local", // FTP_BINARY, FTP_AUTORESUME); while ($ret == FTP_MOREDATA) { //Doe wat je ook maar wil echo "."; // Ga door met downloaden... $ret = ftp_nb_continue ($my_connection); } if ($ret != FTP_FINISHED) { echo "Er was een fout met het uploaden van het bestand..."; exit(1); } ]]> </programlisting> </example> </para> <para> Zie ook <function>ftp_nb_fput</function>, <function>ftp_nb_continue</function>, <function>ftp_put</function> en <function>ftp_fput</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 -->