cvs: phpdoc-zh /reference/ftp/functions ftp-nb-get.xml ftp-rawlist.xml ftp-set-option.xml ftp-site.xml

From: Date: Tue, 19 Nov 2002 02:13:22 +0000
Subject: cvs: phpdoc-zh /reference/ftp/functions ftp-nb-get.xml ftp-rawlist.xml ftp-set-option.xml ftp-site.xml
Groups: php.doc.zh 
Request: Send a blank email to doc-zh+get-888@lists.php.net to get a copy of this message
avenger Mon Nov 18 21:13:22 2002 EDT Added files: /phpdoc-zh/reference/ftp/functions ftp-nb-get.xml ftp-rawlist.xml ftp-set-option.xml ftp-site.xml Log: finished

Index: phpdoc-zh/reference/ftp/functions/ftp-nb-get.xml +++ phpdoc-zh/reference/ftp/functions/ftp-nb-get.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- $Author: avenger $ --> <!-- EN-Revision: 1.2 Maintainer: Avenger Status: ready --> <refentry id="function.ftp-nb-get"> <refnamediv> <refname>ftp_nb_get</refname> <refpurpose>ÖØÐµõ½Ò»¸ö FTP ·þÎñÆ÷ÉϵÄÎļþ²¢Ð´Èë±¾µØÎļþ (non-blocking)</refpurpose> </refnamediv> <refsect1> <title>ÃèÊö</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> º¯ÊýÓÃÀ´ÖØÐµõ½²ÎÊý <parameter>remote_file</parameter> Ö¸¶¨µÄµÄÔ¶³ÌÎļþ£¬²¢±£´æµ½ÓɲÎÊý <parameter>local_file</parameter> Ö¸¶¨µÄ±¾µØÎļþ¡£´«Êäģʽ²ÎÊý <parameter>mode</parameter> Ö»ÄÜΪ <constant>FTP_ASCII</constant> (Îı¾Ä£Ê½) »ò <constant>FTP_BINARY</constant> (¶þ½øÖÆÄ£Ê½) Á½ÖÖ¡£Óë <function>ftp_get</function> º¯Êý²»Í¬µÄÊÇ£¬´Ëº¯ÊýÉÏ´«ÎļþµÄʱºò²ÉÓõÄÊÇÒì²½´«Êäģʽ£¬Ò²¾ÍÒâζ×ÅÔÚÎļþ´«Ë͵Ĺý³ÌÖУ¬ÄãµÄ³ÌÐò¿ÉÒÔ¼ÌÐø¸ÉÆäËüµÄÊÂÇé¡£ </para> <para> ³É¹¦·µ»Ø &true;£¬·ñÔò·µ»Ø &false;¡£ </para> <para> <example> <title><function>ftp_nb_get</function> ʵÀý</title> <programlisting role="php"> <![CDATA[ // ¿ªÊ¼ÏÂÔØ $ret = ftp_nb_get($my_connection, "test", "README", FTP_BINARY); while ($ret == FTP_MOREDATA) { // ÕâÀï¿ÉÒÔ²åÈëÆäËü´úÂë echo "."; // ¼ÌÐøÏÂÔØ... $ret = ftp_nb_continue ($my_connection); } if ($ret != FTP_FINISHED) { echo "ÏÂÔØÖгö´í..."; exit(1); } ]]> </programlisting> </example> <example> <title>ʹÓà <function>ftp_nb_get</function> º¯Êý»Ö¸´ÏÂÔØÎļþ</title> <programlisting role="php"> <![CDATA[ // ¿ªÊ¼ $ret = ftp_nb_get ($my_connection, "test", "README", FTP_BINARY, filesize("test")); // »ò: $ret = ftp_nb_get ($my_connection, "test", "README", // FTP_BINARY, FTP_AUTORESUME); while ($ret == FTP_MOREDATA) { // ¿ÉÒÔ²åÈëÆäËü´úÂë echo "."; // ¼ÌÐø´«ËÍ... $ret = ftp_nb_continue ($my_connection); } if ($ret != FTP_FINISHED) { echo "ÏÂÔØ³ö´í..."; exit(1); } ]]> </programlisting> </example> <example> <title> Resuming a download at position 100 to a new file with <function>ftp_nb_get</function> </title> <programlisting role="php"> <![CDATA[ // ½ûÖ¹×Ô¶¯ËÑѰ ftp_set_option ($my_connection, FTP_AUTOSEEK, FALSE); // ¿ªÊ¼ $ret = ftp_nb_get ($my_connection, "newfile", "README", FTP_BINARY, 100); while ($ret == FTP_MOREDATA) { ... // ¼ÌÐøÏÂÔØ... $ret = ftp_nb_continue ($my_connection); } ]]> </programlisting> </example> </para> <para> ÔÚÉϱߵÄÀý×ÓÖУ¬<filename>"newfile"</filename> Îļþ±È·þÎñÆ÷ÉϵÄÎļþ <filename>"README"</filename> ҪС 100 ×Ö½Ú¡£ÕâÊÇÒòΪÎÒÃÇÊÇ´ÓÎļþµÄÆ«ÒÆÁ¿ 100 ´¦¿ªÊ¼¶ÁÈ¡µÄ£¬Èç¹ûÎÒÃǰѲÎÊý <constant>FTP_AUTOSEEK</constant> ½ûÖ¹µô£¬ÔòÐÂÎļþµÄǰ 100 ×Ö½Ú½«»áÊÇ <literal>'\0'</literal>¡£ </para> <para> ²Î¿¼º¯Êý <function>ftp_nb_fget</function>, <function>ftp_nb_continue</function>, <function>ftp_get</function> and <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-zh/reference/ftp/functions/ftp-rawlist.xml +++ phpdoc-zh/reference/ftp/functions/ftp-rawlist.xml <?xml version="1.0" encoding="gb2312"?> <!-- $Revision: 1.1 $ --> <!-- splitted from ./en/functions/ftp.xml, last change in rev 1.2 --> <!-- $Author: avenger $ --> <!-- EN-Revision: 1.2 Maintainer: Avenger Status: ready --> <refentry id="function.ftp-rawlist"> <refnamediv> <refname>ftp_rawlist</refname> <refpurpose>·µ»ØÖ¸¶¨Ä¿Â¼ÏÂÎļþµÄÏêϸÁбí</refpurpose> </refnamediv> <refsect1> <title>ÃèÊö</title> <methodsynopsis> <type>array</type><methodname>ftp_rawlist</methodname> <methodparam><type>resource</type><parameter>ftp_stream</parameter></methodparam> <methodparam><type>string</type><parameter>directory</parameter></methodparam> </methodsynopsis> <para> <function>ftp_rawlist</function> º¯Êý½«Ö´ÐÐ FTP LIST ÃüÁ²¢°Ñ½á¹û·µ»ØÎªÒ»¸öÊý×é¡£Êý×éµÄÿ¸öÔªËØÎª·µ»ØÎı¾µÄÿһÐУ¬Êä³ö½á¹¹²»»á±»½âÎö¡£Ê¹Óú¯Êý <function>ftp_systype</function> ¿ÉÒÔÓÃÀ´ÅÐ¶Ï FTP ·þÎñÆ÷µÄÀàÐÍ£¬´Ó¶ø¿ÉÒÔÓÃÀ´ÅжϷµ»ØÁбíµÄÀàÐÍ¡£ </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-zh/reference/ftp/functions/ftp-set-option.xml +++ phpdoc-zh/reference/ftp/functions/ftp-set-option.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- splitted from ./en/functions/ftp.xml, last change in rev 1.32 --> <!-- $Author: avenger $ --> <!-- EN-Revision: 1.6 Maintainer: Avenger Status: ready --> <refentry id='function.ftp-set-option'> <refnamediv> <refname>ftp_set_option</refname> <refpurpose>ÉèÖø÷ÖÖ FTP ÔËÐÐʱ¼ä</refpurpose> </refnamediv> <refsect1> <title>ÃèÊö</title> <methodsynopsis> <type>bool</type><methodname>ftp_set_option</methodname> <methodparam><type>resource</type><parameter>ftp_stream</parameter></methodparam> <methodparam><type>int</type><parameter>option</parameter></methodparam> <methodparam><type>mixed</type><parameter>value</parameter></methodparam> </methodsynopsis> <note> <para> ´Ëº¯Êý½öÓÃÓÚ CVS¡£ </para> </note> <para> Èç¹ûÑ¡ÏîÄܹ»±»ÉèÖ㬷µ»Ø &true;£¬·ñÔò·µ»Ø &false;¡£Èç¹û²ÎÊý <parameter>option</parameter> ²»±»Ö§³Ö»òÕ߸ø¶¨µÄ²ÎÊý <parameter>value</parameter> µÄÖµÓë²ÎÊý <parameter>option</parameter> ²»Æ¥Å䣬Ôò»áͬʱ·µ»ØÒ»Ìõ¾¯¸æÐÅÏ¢¡£ </para> <para> ´Ëº¯ÊýÓÃÀ´ÉèÖøø¶¨ FTP ¾ä±úµÄ¸÷ÖÖÔËÐÐʱ¼äÑ¡Ïî¡£²ÎÊý <parameter>value</parameter> µÄֵȡ¾öÓÚ²ÎÊý <parameter>option</parameter> µÄ¸Ä±ä¡£½ØÖ¹µ½Ä¿Ç°£¬±»Ö§³ÖµÄÑ¡ÏîÓÐ: <table> <title>Supported runtime FTP options</title> <tgroup cols="2"> <tbody> <row> <entry>FTP_TIMEOUT_SEC</entry> <entry>¸Ä±äÍøÂç´«ÊäµÄ³¬Ê±Ê±¼ä¡£²ÎÊý <parameter>value</parameter> ±ØÐëΪÕûÊýÇÒ´óÓÚ 0¡£Ä¬Èϵij¬Ê±Ê±¼äΪ 90 Ãë¡£ </entry> </row> <row> <entry>FTP_AUTOSEEK</entry> <entry>µ±´ËÑ¡Ïî´ò¿ªÊ±£¬GET or PUT requests with a <parameter>resumepos</parameter> or <parameter>startpos</parameter> parameter will first seek to the requested position within the file. ´ËÑ¡ÏîĬÈÏÊÇ´ò¿ªµÄ¡£ </entry> </row> </tbody> </tgroup> </table> </para> <para> <example> <title><function>ftp_set_option</function> ʵÀý</title> <programlisting role="php"> <![CDATA[ // ÉèÖÃÍøÂç´«Ê䳬ʱʱ¼äΪ 10 Ãë ftp_set_option($conn_id, FTP_TIMEOUT_SEC, 10); ]]> </programlisting> </example> </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> Index: phpdoc-zh/reference/ftp/functions/ftp-site.xml +++ phpdoc-zh/reference/ftp/functions/ftp-site.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- splitted from ./en/functions/ftp.xml, last change in rev 1.3 --> <!-- $Author: avenger $ --> <!-- EN-Revision: 1.3 Maintainer: Avenger Status: ready --> <refentry id="function.ftp-site"> <refnamediv> <refname>ftp_site</refname> <refpurpose>Ïò·þÎñÆ÷·¢ËÍÕ¾µãÃüÁî</refpurpose> </refnamediv> <refsect1> <title>ÃèÊö</title> <methodsynopsis> <type>bool</type><methodname>ftp_site</methodname> <methodparam><type>resource</type><parameter>ftp_stream</parameter></methodparam> <methodparam><type>string</type><parameter>cmd</parameter></methodparam> </methodsynopsis> <para> <function>ftp_site</function> º¯ÊýÏò FTP ·þÎñÆ÷·¢ËÍÓɲÎÊý <parameter>cmd</parameter> Ö¸¶¨µÄÕ¾µãÃüÁî¡£¸ÃÕ¾µãÃüÁîÊǷDZê×¼»¯µÄ£¬and vary from server to server. They are useful for handling such things as file permissions and group membership. </para> <para> ÔËÐгɹ¦·µ»Ø &true;£¬·ñÔò·µ»Ø &false;¡£ </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 -->
« previous php.doc.zh (#888) next »