cvs: phpdoc-zh /reference/filesystem/functions fnmatch.xml fopen.xml fpassthru.xml
| From: | Dallas Thunder | Date: | Fri, 28 Feb 2003 09:30:52 +0000 |
| Subject: | cvs: phpdoc-zh /reference/filesystem/functions fnmatch.xml fopen.xml fpassthru.xml | ||
| Groups: | php.doc.zh | ||
| Request: | Send a blank email to doc-zh+get-1151@lists.php.net to get a copy of this message | ||
dallas Fri Feb 28 04:30:52 2003 EDT
Modified files:
/phpdoc-zh/reference/filesystem/functions fnmatch.xml fopen.xml
fpassthru.xml
Log:
Updated some files.
Index: phpdoc-zh/reference/filesystem/functions/fnmatch.xml diff -u phpdoc-zh/reference/filesystem/functions/fnmatch.xml:1.1 phpdoc-zh/reference/filesystem/functions/fnmatch.xml:1.2 --- phpdoc-zh/reference/filesystem/functions/fnmatch.xml:1.1 Sun Sep 29 22:56:19 2002 +++ phpdoc-zh/reference/filesystem/functions/fnmatch.xml Fri Feb 28 04:30:51 2003 @@ -1,12 +1,14 @@ -<?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.1 $ --> +<?xml version="1.0" encoding="gb2312"?> +<!-- $Revision: 1.2 $ --> +<!-- $Author: dallas $ --> +<!-- EN-Revision: 1.1 Maintainer: dallas Status: ready --> <refentry id="function.fnmatch"> <refnamediv> <refname>fnmatch</refname> - <refpurpose>Match filename against a pattern</refpurpose> + <refpurpose>ÓÃģʽƥÅäÎļþÃû</refpurpose> </refnamediv> <refsect1> - <title>Description</title> + <title>˵Ã÷</title> <methodsynopsis> <type>array</type><methodname>fnmatch</methodname> <methodparam><type>string</type><parameter>pattern</parameter></methodparam> @@ -14,20 +16,25 @@ <methodparam choice="opt"><type>int</type><parameter>flags</parameter></methodparam> </methodsynopsis> <para> - <function>fnmatch</function> checks if the passed <parameter>string</parameter> would - match the given shell wildcard <parameter>pattern</parameter>. + <function>fnmatch</function> + ¼ì²é´«ÈëµÄ + <parameter>string</parameter> + ÊÇ·ñÆ¥Å䏸³öµÄ shell ͳÅä·û + <parameter>pattern</parameter>¡£ </para> <para> - This is especialy usefull for filenames, but may also be used on regular strings. - The average user may be used to shell patterns or at least in their simplest form - to <literal>'?'</literal> and <literal>'*'</literal> wildcards so using - <function>fnmatch</function> instead of <function>ereg</function> or - <function>preg_match</function> for frontend search expression input may be - way more convenient for non-programming users. + ´Ëº¯Êý¶ÔÓÚÎļþÃûÓÈÆäÓÐÓ㬵«Ò²¿ÉÒÔÓÃÓÚÆÕͨµÄ×Ö·û´®¡£ÆÕͨÓû§¿ÉÄÜϰ¹ßÓÚ + shell ģʽ»òÕßÖÁÉÙÆäÖÐ×î¼òµ¥µÄÐÎʽ + <literal>'?'</literal> ºÍ <literal>'*'</literal> + ͨÅä·û£¬Òò´ËʹÓà + <function>fnmatch</function> + À´´úÌæ <function>ereg</function> »òÕß + <function>preg_match</function> + À´½øÐÐǰ¶ËËÑË÷±í´ïʽÊäÈë¶ÔÓڷdzÌÐòÔ±Óû§¸ü¼Ó·½±ã¡£ </para> <example> <title> - Checking a color name against a shell wildcard pattern. + Óà shell ÖеÄͨÅä·ûģʽƥÅäÀ´¼ì²éÑÕÉ« </title> <programlisting role="php"> <![CDATA[ @@ -38,11 +45,9 @@ </programlisting> </example> <para> - See also <function>glob</function>, - <function>ereg</function>, - <function>preg_match</function> - and the unix manpage on <literal>fnmatch(3)</literal> for flag names - (as long as they are not documented here <!-- TODO hartmut -->). + ²Î¼û + <function>glob</function>£¬<function>ereg</function>£¬<function>preg_match</function> + ºÍ UNIX ÖÐ <literal>fnmatch(3)</literal> µÄÊÖ²áÖеıêÖ¾Ãû£¨Ö»Òª±¾ÎĵµÖл¹Î´°üÀ¨ËüÃÇ<!-- TODO hartmut -->£©¡£ </para> </refsect1> </refentry> Index: phpdoc-zh/reference/filesystem/functions/fopen.xml diff -u phpdoc-zh/reference/filesystem/functions/fopen.xml:1.3 phpdoc-zh/reference/filesystem/functions/fopen.xml:1.4 --- phpdoc-zh/reference/filesystem/functions/fopen.xml:1.3 Fri Feb 7 21:43:51 2003 +++ phpdoc-zh/reference/filesystem/functions/fopen.xml Fri Feb 28 04:30:51 2003 @@ -1,15 +1,15 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.3 $ --> -<!-- $Author: lm92 $ --> -<!-- EN-Revision: 1.2 Maintainer: Liuming Status: ready --> -<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 --> +<!-- $Revision: 1.4 $ --> +<!-- $Author: dallas $ --> +<!-- EN-Revision: 1.10 Maintainer: dallas Status: ready --> +<!-- CREDITS: lm92 --> <refentry id="function.fopen"> <refnamediv> <refname>fopen</refname> - <refpurpose>´ò¿ªÎļþ»òÕßURL</refpurpose> + <refpurpose>´ò¿ªÎļþ»òÕß URL</refpurpose> </refnamediv> <refsect1> - <title>ÃèÊö</title> + <title>˵Ã÷</title> <methodsynopsis> <type>resource</type><methodname>fopen</methodname> <methodparam><type>string</type><parameter>filename</parameter></methodparam> @@ -18,99 +18,120 @@ <methodparam choice="opt"><type>resource</type><parameter>zcontext</parameter></methodparam> </methodsynopsis> <simpara> - <function>fopen</function> binds a named resource, specified - by <parameter>filename</parameter>, to a stream. If - <parameter>filename</parameter> is of the form "scheme://...", - it is assumed to be a URL and PHP will search for a protocol - handler (also known as a wrapper) for that scheme. If no - wrappers for that protocol are registered, PHP will emit - a notice to help you track potential problems in your script - and then continue as though <parameter>filename</parameter> - specifies a regular file. + <function>fopen</function> ½« + <parameter>filename</parameter> + Ö¸¶¨µÄÃû×Ö×ÊÔ´°ó¶¨µ½Ò»¸öÁ÷ÉÏ¡£Èç¹û + <parameter>filename</parameter> + ÊÇ "scheme://..." µÄ¸ñʽ£¬Ôò±»µ±³ÉÒ»¸ö + URL£¬PHP ½«ËÑË÷ÐÒé´¦ÀíÆ÷£¨Ò²±»³ÆÎª·â×°ÐÒ飩À´´¦Àí´Ëģʽ¡£Èç¹û¸ÃÐÒéÉÐδע²á·â×°ÐÒ飬PHP + ½«·¢³öÒ»ÌõÏûÏ¢À´°ïÖú¼ì²é½Å±¾ÖÐDZÔÚµÄÎÊÌâ²¢½« + <parameter>filename</parameter> + µ±³ÉÒ»¸öÆÕͨµÄÎļþÃû¼ÌÐøÖ´ÐÐÏÂÈ¥¡£ </simpara> <simpara> - If PHP has decided that <parameter>filename</parameter> specifies - a local file, then it will try to open a stream on that file. - The file must be accessible to PHP, so you need to ensure that - the file access permissions allow this access. - If you have enabled <link linkend="ini.safe-mode">safe_mode</link>, - or <link linkend="ini.open-basedir">open_basedir</link> further - restrictions may apply. + Èç¹û PHP ÈÏΪ + <parameter>filename</parameter> + Ö¸¶¨µÄÊÇÒ»¸ö±¾µØÎļþ£¬½«³¢ÊÔÔÚ¸ÃÎļþÉÏ´ò¿ªÒ»¸öÁ÷¡£¸ÃÎļþ±ØÐëÊÇ + PHP ¿ÉÒÔ·ÃÎʵģ¬Òò´ËÐèҪȷÈÏÎļþ·ÃÎÊȨÏÞÔÊÐí¸Ã·ÃÎÊ¡£Èç¹û¼¤»îÁË + &safemode; »òÕß + <link linkend="ini.open-basedir">open_basedir</link> + Ôò»áÓ¦ÓýøÒ»²½µÄÏÞÖÆ¡£ </simpara> <simpara> - If PHP has decided that <parameter>filename</parameter> specifies - a registered protocol, and that protocol is registered as a - network URL, PHP will check to make sure that - <link linkend="ini.allow-url-fopen">allow_url_fopen</link> is - enabled. If it is switched off, PHP will emit a warning and - the fopen call will fail. + Èç¹û PHP ÈÏΪ + <parameter>filename</parameter> + Ö¸¶¨µÄÊÇÒ»¸öÒÑ×¢²áµÄÐÒ飬¶ø¸ÃÐÒé±»×¢²áΪһ¸öÍøÂç + URL£¬PHP ½«¼ì²é²¢È·ÈÏ + <link linkend="ini.allow-url-fopen">allow_url_fopen</link> + Òѱ»¼¤»î¡£Èç¹û¹Ø±ÕÁË£¬PHP ½«·¢³öÒ»¸ö¾¯¸æ£¬¶ø fopen µÄµ÷ÓÃÔòʧ°Ü¡£ </simpara> <note> <simpara> - Äã¿ÉÒÔÔÚ <xref linkend="wrappers"/> ÕÒµ½Ö§³ÖµÄÐÒé¡£ + ËùÖ§³ÖµÄÐÒéÁбí¼û<xref linkend="wrappers"/>¡£ </simpara> </note> <para> - <parameter>mode</parameter> Ö¸¶¨ÁË´ò¿ªÎļþµÄ·½Ê½£¬ - Ëü¿ÉÒÔÊÇÒÔϵļ¸ÖÖÇé¿ö£º - <itemizedlist> - <listitem> - <simpara> - 'r' - ÒÔÖ»¶Á·½Ê½´ò¿ªÎļþ£»°ÑÎļþÖ¸Õë·Åµ½Îļþ¿ªÍ·¡£ - </simpara> - </listitem> - <listitem> - <simpara> - 'r+' - ÒԿɶÁд·½Ê½´ò¿ªÎļþ£»°ÑÎļþÖ¸Õë·Åµ½Îļþ¿ªÍ·¡£ - </simpara> - </listitem> - <listitem> - <simpara> - 'w' - ÒÔֻд·½Ê½´ò¿ªÎļþ£»°ÑÎļþÖ¸Õë·Åµ½Îļþ¿ªÍ·²¢Çå³ýÎļþÄÚµÄËùÓÐÄÚÈÝ¡£ - Èç¹ûÎļþ²»´æÔÚ£¬Ôò³¢ÊÔ½¨Á¢¡£ - </simpara> - </listitem> - <listitem> - <simpara> - 'w+' - ÒԿɶÁд·½Ê½´ò¿ªÎļþ£»°ÑÎļþÖ¸Õë·Åµ½Îļþ¿ªÍ·²¢Çå³ýÎļþÄÚµÄËùÓÐÄÚÈÝ¡£ - Èç¹ûÎļþ²»´æÔÚ£¬Ôò³¢ÊÔ½¨Á¢¡£ - </simpara> - </listitem> - <listitem> - <simpara> - 'a' - ÒÔֻд·½Ê½´ò¿ªÎļþ£»°ÑÎļþÖ¸Õë·Åµ½Îļþ¿ªÍ·¡£ - Èç¹ûÎļþ²»´æÔÚ£¬Ôò³¢ÊÔ½¨Á¢¡£ - </simpara> - </listitem> - <listitem> - <simpara> - 'a+' - ÒԿɶÁд·½Ê½´ò¿ªÎļþ£»°ÑÎļþÖ¸Õë·Åµ½Îļþ¿ªÍ·¡£ - Èç¹ûÎļþ²»´æÔÚ£¬Ôò³¢ÊÔ½¨Á¢¡£ - </simpara> - </listitem> - </itemizedlist> + <parameter>mode</parameter> + ²ÎÊýÖ¸¶¨ÁËËùÒªÇ󵽸ÃÁ÷µÄ·ÃÎÊÀàÐÍ¡£¿ÉÒÔÊÇÒÔÏ£º + <table> + <title> + <function>fopen</function> ÖÐµÄ + <parameter>mode</parameter> µÄ¿ÉÄÜÖµÁбí + </title> + <tgroup cols="2"> + <thead> + <row> + <entry><parameter>mode</parameter></entry> + <entry>˵Ã÷</entry> + </row> + </thead> + <tbody> + <row> + <entry><literal>'r'</literal></entry> + <entry> + Ö»¶Á·½Ê½´ò¿ª£¬½«ÎļþÖ¸ÕëÖ¸ÏòÎļþÍ·¡£ + </entry> + </row> + <row> + <entry><literal>'r+'</literal></entry> + <entry> + ¶Áд·½Ê½´ò¿ª£¬½«ÎļþÖ¸ÕëÖ¸ÏòÎļþÍ·¡£ + </entry> + </row> + <row> + <entry><literal>'w'</literal></entry> + <entry> + дÈ뷽ʽ´ò¿ª£¬½«ÎļþÖ¸ÕëÖ¸ÏòÎļþÍ·²¢½«Îļþ´óС½ØÎªÁã¡£Èç¹ûÎļþ²»´æÔÚÔò³¢ÊÔ´´½¨Ö®¡£ + </entry> + </row> + <row> + <entry><literal>'w+'</literal></entry> + <entry> + ¶Áд·½Ê½´ò¿ª£¬½«ÎļþÖ¸ÕëÖ¸ÏòÎļþÍ·²¢½«Îļþ´óС½ØÎªÁã¡£Èç¹ûÎļþ²»´æÔÚÔò³¢ÊÔ´´½¨Ö®¡£ + </entry> + </row> + <row> + <entry><literal>'a'</literal></entry> + <entry> + дÈ뷽ʽ´ò¿ª£¬½«ÎļþÖ¸ÕëÖ¸ÏòÎļþĩβ¡£Èç¹ûÎļþ²»´æÔÚÔò³¢ÊÔ´´½¨Ö®¡£ + </entry> + </row> + <row> + <entry><literal>'a+'</literal></entry> + <entry> + ¶Áд·½Ê½´ò¿ª£¬½«ÎļþÖ¸ÕëÖ¸ÏòÎļþĩβ¡£Èç¹ûÎļþ²»´æÔÚÔò³¢ÊÔ´´½¨Ö®¡£ + </entry> + </row> + </tbody> + </tgroup> + </table> </para> <note> <para> - ¿ÉÒÔÔÚ <parameter>mode</parameter> ÄÚ¼ÓÈë×Öĸ¡®b¡¯¡£ - ËüÖ»ÔÚÇø·Ö¶þ½øÖÆÎļþºÍÎı¾ÎļþµÄϵͳÉÏÓÐÓã¨ÀýÈç Windows¡£Ëü¶ÔÓÚUnix²»Æð×÷Óã©¡£ - Èç¹û²»ÐèÒª£¬¿ÉÒÔºöÂÔ¡£ÍƼöÄúÓá®b¡¯Ê¹ÄúµÄ´úÂë¸üÇá±ã¡£ + <parameter>mode</parameter> ¿ÉÒÔ°üÀ¨×Öĸ + 'b'£¬½öÔÚÇø·Ö¶þ½øÖƺÍÎı¾ÎļþµÄϵͳÏÂÓÐÓã¨ÀýÈç + Windows¡£ÔÚ UNIX ÏÂûÓÐÓã©¡£Èç¹û²»ÐèÒª½«±»ºöÂÔ¡£¹ÄÀøÓû§°üÀ¨ + 'b' ±ê¼ÇÒÔʹ½Å±¾¾ßÓиüºÃµÄÒÆÖ²ÐÔ¡£ </para> </note> <para> - Èç¹ûÄãÒªÔÚ <link linkend="ini.include-path">include_path</link> ÀïËÑË÷ÎļþµÄ»°£¬ - ¿ÉÒÔ½«µÚÈý¸ö²ÎÊý <parameter>use_include_path</parameter> ÉèΪ¡®1¡¯»ò &true;¡£ + Èç¹ûÒ²ÐèÒªÔÚ + <link linkend="ini.include-path">include_path</link> + ÖÐËÑѰÎļþµÄ»°£¬¿ÉÒÔ½«¿ÉÑ¡µÄµÚÈý¸ö²ÎÊý + <parameter>use_include_path</parameter> + ÉèΪ '1' »ò &true;¡£ </para> <para> - The optional fourth <parameter>zcontext</parameter> is used for - specifying tuning parameters and callbacks. + ¿ÉÑ¡µÄµÚËĸö²ÎÊý + <parameter>zcontext</parameter> + ÓÃÓÚÖ¸¶¨µ÷Õû²ÎÊýºÍ»Øµ÷¡£ </para> <simpara> - Èç¹û´ò¿ªÊ§°Ü£¬º¯Êý»á·µ»Ø &false;. + Èç¹û´ò¿ªÊ§°Ü£¬±¾º¯Êý·µ»Ø &false;¡£ </simpara> <para> <example> - <title><function>fopen</function> µÄ·¶Àý</title> + <title><function>fopen</function> Àý×Ó</title> <programlisting role="php"> <![CDATA[ <?php @@ -124,15 +145,13 @@ </example> </para> <simpara> - If you are experiencing problems with reading and writing to - files and you're using the server module version of PHP, remember - to make sure that the files and directories you're using are - accessible to the server process. + Èç¹ûÔÚÓ÷þÎñÆ÷Ä£¿é°æ±¾µÄ PHP + ʱÔÚ´ò¿ªºÍдÈëÎļþÉÏÓöµ½ÎÊÌ⣬¼ÇסҪȷ±£ËùʹÓõÄÎļþÊÇ·þÎñÆ÷½ø³ÌËùÄܹ»·ÃÎʵġ£ </simpara> <para> - ÔÚWindowsƽ̨£¬Ð¡ÐÄ©µôÎļþ·¾¶ÖеÄÈκÎÒ»¸ö·´Ð±¸Ü»òб¸Ü¡£ + ÔÚ Windows ƽ̨ÉÏ£¬ÒªÐ¡ÐÄתÒåÎļþ·¾¶ÖеÄÿ¸ö·´Ð±Ïߣ¬»òÕßÓÃбÏß¡£ <informalexample> - <programlisting role="php"> + <programlisting role="php"> <![CDATA[ <?php $handle = fopen ("c:\\data\\info.txt", "r"); @@ -142,15 +161,8 @@ </informalexample> </para> <simpara> - ²Î¼û <xref linkend="wrappers"/>, - <function>fclose</function>, - <function>fgets</function>, - <function>fsockopen</function>, - <function>file</function>, - <function>file_exists</function>, - <function>is_readable</function>, - <function>socket_set_timeout</function>, and - <function>popen</function>. + ²Î¼û<xref linkend="wrappers"/>£¬<function>fclose</function>£¬<function>fgets</function>£¬<function>fsockopen</function>£¬<function>file</function>£¬<function>file_exists</function>£¬<function>is_readable</function>£¬<function>socket_set_timeout</function> + ºÍ <function>popen</function>¡£ </simpara> </refsect1> </refentry> Index: phpdoc-zh/reference/filesystem/functions/fpassthru.xml diff -u phpdoc-zh/reference/filesystem/functions/fpassthru.xml:1.4 phpdoc-zh/reference/filesystem/functions/fpassthru.xml:1.5 --- phpdoc-zh/reference/filesystem/functions/fpassthru.xml:1.4 Fri Feb 7 21:49:53 2003 +++ phpdoc-zh/reference/filesystem/functions/fpassthru.xml Fri Feb 28 04:30:51 2003 @@ -1,59 +1,59 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.4 $ --> -<!-- $Author: lm92 $ --> -<!-- EN-Revision: 1.2 Maintainer: Liuming Status: ready --> -<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 --> +<!-- $Revision: 1.5 $ --> +<!-- $Author: dallas $ --> +<!-- EN-Revision: 1.5 Maintainer: dallas Status: ready --> +<!-- CREDITS: lm92 --> <refentry id="function.fpassthru"> <refnamediv> <refname>fpassthru</refname> - <refpurpose>°ÑÎļþÖ¸Õë´¦µÄÊ£ÓàµÄÊý¾ÝÈ«²¿Êä³ö</refpurpose> + <refpurpose>Êä³öÎļþÖ¸Õë´¦µÄËùÓÐÊ£ÓàÊý¾Ý</refpurpose> </refnamediv> <refsect1> - <title>ÃèÊö</title> + <title>˵Ã÷</title> <methodsynopsis> <type>int</type><methodname>fpassthru</methodname> <methodparam><type>resource</type><parameter>handle</parameter></methodparam> </methodsynopsis> <simpara> - °´ÎļþÖ¸Õë´Óµ±Ç°µÄλÖöÁÈ¡µ½EOF£¨End of file£©²¢°Ñ½á¹ûдµ½Êä³ö»º³åÆ÷¡£ + ½«¸ø¶¨µÄÎļþÖ¸Õë´Óµ±Ç°µÄλÖöÁÈ¡µ½ EOF ²¢°Ñ½á¹ûдµ½Êä³ö»º³åÇø¡£ </simpara> <simpara> - Èç¹û·¢Éú´íÎó£¬ <function>fpassthru</function> ¾Í»á·µ»Ø &false;¡£ - ·ñÔò£¬ <function>fpassthru</function> ¾Í·µ»Ø´Ó <parameter>handle</parameter> - ×Ö·ûÊýÄ¿ÒÔ¼°´«µÝµ½±ê×¼Êä³ö¡£ + Èç¹û·¢Éú´íÎó£¬ <function>fpassthru</function> ·µ»Ø &false;¡£ + ·ñÔò <function>fpassthru</function> ·µ»Ø´Ó <parameter>handle</parameter> + ¶ÁÈ¡²¢´«µÝµ½Êä³öµÄ×Ö·ûÊýÄ¿¡£ </simpara> <simpara> - ÎļþÖ¸Õë±ØÐëÓÐЧ£¬ÇÒ±ØÐë³É¹¦´ò¿ªÓÉ - <function>fopen</function>£¬ <function>popen</function>£¬»ò - <function>fsockopen</function> Ö¸¶¨µÄÎļþ¡£ - Èç¹ûÄãÒѾÏòÎļþ¼ÐдÈëÁËÊý¾Ý£¬Äã±ØÐëʹÓà <function>rewind</function> - À´ÖØÉèÎļþÖ¸Õëµ½ÎļþµÄ¿ªÍ·¡£ - µ± <function>fpassthru</function> ¶ÁÍêÎļþºó£¬¾Í»á¹Ø±ÕÖ¸Õë¹Ø±Õ - <parameter>handle</parameter> £©¡£ + ÎļþÖ¸Õë±ØÐëÓÐЧ£¬ÇÒ±ØÐëÖ¸ÏòÓÉ + <function>fopen</function>£¬<function>popen</function> »ò + <function>fsockopen</function> ³É¹¦´ò¿ªµÄÎļþ¡£ + Èç¹ûÒѾÏòÎļþдÈëÁËÊý¾Ý£¬¿ÉÄÜÐèÒªµ÷Óà <function>rewind</function> + À´½«ÎļþÖ¸ÕëÖ¸ÏòÎļþÍ·¡£µ± <function>fpassthru</function> + Íê³É¶ÁÈ¡ºó¾Í»á¹Ø±ÕÎļþ£¨Ê¹ <parameter>handle</parameter> ʧЧ£©¡£ </simpara> <simpara> - If you just want to dump the contents of a file to the output buffer, - without first modifying it or seeking to a particular offset, you may - want to use the <function>readfile</function>, which saves you - the <function>fopen</function> call. + Èç¹û¼È²»ÐÞ¸ÄÎļþÒ²²»ÔÚÌØ¶¨Î»ÖüìË÷£¬Ö»Ï뽫ÎļþµÄÄÚÈÝÏÂÔØµ½Êä³ö»º³åÇø£¬Ó¦¸ÃʹÓà + <function>readfile</function>£¬ÕâÑù¿ÉÒÔʡȥ + <function>fopen</function> µ÷Óᣠ</simpara> <note> <para> - When using <function>fpassthru</function> on a binary file on Windows - systems, you should make sure to open the file in binary mode by - appending a <literal>b</literal> to the mode used in the call to - <function>fopen</function>. + µ±ÔÚ Windows + ϵͳÖн« <function>fpassthru</function> + ÓÃÓÚ¶þ½øÖÆÎļþʱ£¬ÒªÈ·±£ÔÚÓà + <function>fopen</function> + ´ò¿ªÎļþʱÔÚ mode Öи½¼ÓÁË + <literal>b</literal> À´½«ÎļþÒÔ¶þ½øÖÆ·½Ê½´ò¿ª¡£ </para> <para> - You are encouraged to use the <literal>b</literal> flag when dealing - with binary files, even if your system does not require it, so that - your scripts will be more portable. + ¹ÄÀøÔÚ´¦Àí¶þ½øÖÆÎļþʱʹÓà + <literal>b</literal> + ±êÖ¾£¬¼´Ê¹ÏµÍ³²¢²»ÐèÒª£¬ÕâÑù¿ÉÒÔʹ½Å±¾µÄÒÆÖ²ÐÔ¸üºÃ¡£ </para> </note> <simpara> - See also <function>readfile</function>, - <function>fopen</function>, <function>popen</function>, and - <function>fsockopen</function> + ²Î¼û + <function>readfile</function>£¬<function>fopen</function>£¬<function>popen</function> + ºÍ <function>fsockopen</function>¡£ </simpara> </refsect1> </refentry>
Index: phpdoc-zh/reference/filesystem/functions/fnmatch.xml diff -u phpdoc-zh/reference/filesystem/functions/fnmatch.xml:1.1 phpdoc-zh/reference/filesystem/functions/fnmatch.xml:1.2 --- phpdoc-zh/reference/filesystem/functions/fnmatch.xml:1.1 Sun Sep 29 22:56:19 2002 +++ phpdoc-zh/reference/filesystem/functions/fnmatch.xml Fri Feb 28 04:30:51 2003 @@ -1,12 +1,14 @@ -<?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.1 $ --> +<?xml version="1.0" encoding="gb2312"?> +<!-- $Revision: 1.2 $ --> +<!-- $Author: dallas $ --> +<!-- EN-Revision: 1.1 Maintainer: dallas Status: ready --> <refentry id="function.fnmatch"> <refnamediv> <refname>fnmatch</refname> - <refpurpose>Match filename against a pattern</refpurpose> + <refpurpose>ÓÃģʽƥÅäÎļþÃû</refpurpose> </refnamediv> <refsect1> - <title>Description</title> + <title>˵Ã÷</title> <methodsynopsis> <type>array</type><methodname>fnmatch</methodname> <methodparam><type>string</type><parameter>pattern</parameter></methodparam> @@ -14,20 +16,25 @@ <methodparam choice="opt"><type>int</type><parameter>flags</parameter></methodparam> </methodsynopsis> <para> - <function>fnmatch</function> checks if the passed <parameter>string</parameter> would - match the given shell wildcard <parameter>pattern</parameter>. + <function>fnmatch</function> + ¼ì²é´«ÈëµÄ + <parameter>string</parameter> + ÊÇ·ñÆ¥Å䏸³öµÄ shell ͳÅä·û + <parameter>pattern</parameter>¡£ </para> <para> - This is especialy usefull for filenames, but may also be used on regular strings. - The average user may be used to shell patterns or at least in their simplest form - to <literal>'?'</literal> and <literal>'*'</literal> wildcards so using - <function>fnmatch</function> instead of <function>ereg</function> or - <function>preg_match</function> for frontend search expression input may be - way more convenient for non-programming users. + ´Ëº¯Êý¶ÔÓÚÎļþÃûÓÈÆäÓÐÓ㬵«Ò²¿ÉÒÔÓÃÓÚÆÕͨµÄ×Ö·û´®¡£ÆÕͨÓû§¿ÉÄÜϰ¹ßÓÚ + shell ģʽ»òÕßÖÁÉÙÆäÖÐ×î¼òµ¥µÄÐÎʽ + <literal>'?'</literal> ºÍ <literal>'*'</literal> + ͨÅä·û£¬Òò´ËʹÓà + <function>fnmatch</function> + À´´úÌæ <function>ereg</function> »òÕß + <function>preg_match</function> + À´½øÐÐǰ¶ËËÑË÷±í´ïʽÊäÈë¶ÔÓڷdzÌÐòÔ±Óû§¸ü¼Ó·½±ã¡£ </para> <example> <title> - Checking a color name against a shell wildcard pattern. + Óà shell ÖеÄͨÅä·ûģʽƥÅäÀ´¼ì²éÑÕÉ« </title> <programlisting role="php"> <![CDATA[ @@ -38,11 +45,9 @@ </programlisting> </example> <para> - See also <function>glob</function>, - <function>ereg</function>, - <function>preg_match</function> - and the unix manpage on <literal>fnmatch(3)</literal> for flag names - (as long as they are not documented here <!-- TODO hartmut -->). + ²Î¼û + <function>glob</function>£¬<function>ereg</function>£¬<function>preg_match</function> + ºÍ UNIX ÖÐ <literal>fnmatch(3)</literal> µÄÊÖ²áÖеıêÖ¾Ãû£¨Ö»Òª±¾ÎĵµÖл¹Î´°üÀ¨ËüÃÇ<!-- TODO hartmut -->£©¡£ </para> </refsect1> </refentry> Index: phpdoc-zh/reference/filesystem/functions/fopen.xml diff -u phpdoc-zh/reference/filesystem/functions/fopen.xml:1.3 phpdoc-zh/reference/filesystem/functions/fopen.xml:1.4 --- phpdoc-zh/reference/filesystem/functions/fopen.xml:1.3 Fri Feb 7 21:43:51 2003 +++ phpdoc-zh/reference/filesystem/functions/fopen.xml Fri Feb 28 04:30:51 2003 @@ -1,15 +1,15 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.3 $ --> -<!-- $Author: lm92 $ --> -<!-- EN-Revision: 1.2 Maintainer: Liuming Status: ready --> -<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 --> +<!-- $Revision: 1.4 $ --> +<!-- $Author: dallas $ --> +<!-- EN-Revision: 1.10 Maintainer: dallas Status: ready --> +<!-- CREDITS: lm92 --> <refentry id="function.fopen"> <refnamediv> <refname>fopen</refname> - <refpurpose>´ò¿ªÎļþ»òÕßURL</refpurpose> + <refpurpose>´ò¿ªÎļþ»òÕß URL</refpurpose> </refnamediv> <refsect1> - <title>ÃèÊö</title> + <title>˵Ã÷</title> <methodsynopsis> <type>resource</type><methodname>fopen</methodname> <methodparam><type>string</type><parameter>filename</parameter></methodparam> @@ -18,99 +18,120 @@ <methodparam choice="opt"><type>resource</type><parameter>zcontext</parameter></methodparam> </methodsynopsis> <simpara> - <function>fopen</function> binds a named resource, specified - by <parameter>filename</parameter>, to a stream. If - <parameter>filename</parameter> is of the form "scheme://...", - it is assumed to be a URL and PHP will search for a protocol - handler (also known as a wrapper) for that scheme. If no - wrappers for that protocol are registered, PHP will emit - a notice to help you track potential problems in your script - and then continue as though <parameter>filename</parameter> - specifies a regular file. + <function>fopen</function> ½« + <parameter>filename</parameter> + Ö¸¶¨µÄÃû×Ö×ÊÔ´°ó¶¨µ½Ò»¸öÁ÷ÉÏ¡£Èç¹û + <parameter>filename</parameter> + ÊÇ "scheme://..." µÄ¸ñʽ£¬Ôò±»µ±³ÉÒ»¸ö + URL£¬PHP ½«ËÑË÷ÐÒé´¦ÀíÆ÷£¨Ò²±»³ÆÎª·â×°ÐÒ飩À´´¦Àí´Ëģʽ¡£Èç¹û¸ÃÐÒéÉÐδע²á·â×°ÐÒ飬PHP + ½«·¢³öÒ»ÌõÏûÏ¢À´°ïÖú¼ì²é½Å±¾ÖÐDZÔÚµÄÎÊÌâ²¢½« + <parameter>filename</parameter> + µ±³ÉÒ»¸öÆÕͨµÄÎļþÃû¼ÌÐøÖ´ÐÐÏÂÈ¥¡£ </simpara> <simpara> - If PHP has decided that <parameter>filename</parameter> specifies - a local file, then it will try to open a stream on that file. - The file must be accessible to PHP, so you need to ensure that - the file access permissions allow this access. - If you have enabled <link linkend="ini.safe-mode">safe_mode</link>, - or <link linkend="ini.open-basedir">open_basedir</link> further - restrictions may apply. + Èç¹û PHP ÈÏΪ + <parameter>filename</parameter> + Ö¸¶¨µÄÊÇÒ»¸ö±¾µØÎļþ£¬½«³¢ÊÔÔÚ¸ÃÎļþÉÏ´ò¿ªÒ»¸öÁ÷¡£¸ÃÎļþ±ØÐëÊÇ + PHP ¿ÉÒÔ·ÃÎʵģ¬Òò´ËÐèҪȷÈÏÎļþ·ÃÎÊȨÏÞÔÊÐí¸Ã·ÃÎÊ¡£Èç¹û¼¤»îÁË + &safemode; »òÕß + <link linkend="ini.open-basedir">open_basedir</link> + Ôò»áÓ¦ÓýøÒ»²½µÄÏÞÖÆ¡£ </simpara> <simpara> - If PHP has decided that <parameter>filename</parameter> specifies - a registered protocol, and that protocol is registered as a - network URL, PHP will check to make sure that - <link linkend="ini.allow-url-fopen">allow_url_fopen</link> is - enabled. If it is switched off, PHP will emit a warning and - the fopen call will fail. + Èç¹û PHP ÈÏΪ + <parameter>filename</parameter> + Ö¸¶¨µÄÊÇÒ»¸öÒÑ×¢²áµÄÐÒ飬¶ø¸ÃÐÒé±»×¢²áΪһ¸öÍøÂç + URL£¬PHP ½«¼ì²é²¢È·ÈÏ + <link linkend="ini.allow-url-fopen">allow_url_fopen</link> + Òѱ»¼¤»î¡£Èç¹û¹Ø±ÕÁË£¬PHP ½«·¢³öÒ»¸ö¾¯¸æ£¬¶ø fopen µÄµ÷ÓÃÔòʧ°Ü¡£ </simpara> <note> <simpara> - Äã¿ÉÒÔÔÚ <xref linkend="wrappers"/> ÕÒµ½Ö§³ÖµÄÐÒé¡£ + ËùÖ§³ÖµÄÐÒéÁбí¼û<xref linkend="wrappers"/>¡£ </simpara> </note> <para> - <parameter>mode</parameter> Ö¸¶¨ÁË´ò¿ªÎļþµÄ·½Ê½£¬ - Ëü¿ÉÒÔÊÇÒÔϵļ¸ÖÖÇé¿ö£º - <itemizedlist> - <listitem> - <simpara> - 'r' - ÒÔÖ»¶Á·½Ê½´ò¿ªÎļþ£»°ÑÎļþÖ¸Õë·Åµ½Îļþ¿ªÍ·¡£ - </simpara> - </listitem> - <listitem> - <simpara> - 'r+' - ÒԿɶÁд·½Ê½´ò¿ªÎļþ£»°ÑÎļþÖ¸Õë·Åµ½Îļþ¿ªÍ·¡£ - </simpara> - </listitem> - <listitem> - <simpara> - 'w' - ÒÔֻд·½Ê½´ò¿ªÎļþ£»°ÑÎļþÖ¸Õë·Åµ½Îļþ¿ªÍ·²¢Çå³ýÎļþÄÚµÄËùÓÐÄÚÈÝ¡£ - Èç¹ûÎļþ²»´æÔÚ£¬Ôò³¢ÊÔ½¨Á¢¡£ - </simpara> - </listitem> - <listitem> - <simpara> - 'w+' - ÒԿɶÁд·½Ê½´ò¿ªÎļþ£»°ÑÎļþÖ¸Õë·Åµ½Îļþ¿ªÍ·²¢Çå³ýÎļþÄÚµÄËùÓÐÄÚÈÝ¡£ - Èç¹ûÎļþ²»´æÔÚ£¬Ôò³¢ÊÔ½¨Á¢¡£ - </simpara> - </listitem> - <listitem> - <simpara> - 'a' - ÒÔֻд·½Ê½´ò¿ªÎļþ£»°ÑÎļþÖ¸Õë·Åµ½Îļþ¿ªÍ·¡£ - Èç¹ûÎļþ²»´æÔÚ£¬Ôò³¢ÊÔ½¨Á¢¡£ - </simpara> - </listitem> - <listitem> - <simpara> - 'a+' - ÒԿɶÁд·½Ê½´ò¿ªÎļþ£»°ÑÎļþÖ¸Õë·Åµ½Îļþ¿ªÍ·¡£ - Èç¹ûÎļþ²»´æÔÚ£¬Ôò³¢ÊÔ½¨Á¢¡£ - </simpara> - </listitem> - </itemizedlist> + <parameter>mode</parameter> + ²ÎÊýÖ¸¶¨ÁËËùÒªÇ󵽸ÃÁ÷µÄ·ÃÎÊÀàÐÍ¡£¿ÉÒÔÊÇÒÔÏ£º + <table> + <title> + <function>fopen</function> ÖÐµÄ + <parameter>mode</parameter> µÄ¿ÉÄÜÖµÁбí + </title> + <tgroup cols="2"> + <thead> + <row> + <entry><parameter>mode</parameter></entry> + <entry>˵Ã÷</entry> + </row> + </thead> + <tbody> + <row> + <entry><literal>'r'</literal></entry> + <entry> + Ö»¶Á·½Ê½´ò¿ª£¬½«ÎļþÖ¸ÕëÖ¸ÏòÎļþÍ·¡£ + </entry> + </row> + <row> + <entry><literal>'r+'</literal></entry> + <entry> + ¶Áд·½Ê½´ò¿ª£¬½«ÎļþÖ¸ÕëÖ¸ÏòÎļþÍ·¡£ + </entry> + </row> + <row> + <entry><literal>'w'</literal></entry> + <entry> + дÈ뷽ʽ´ò¿ª£¬½«ÎļþÖ¸ÕëÖ¸ÏòÎļþÍ·²¢½«Îļþ´óС½ØÎªÁã¡£Èç¹ûÎļþ²»´æÔÚÔò³¢ÊÔ´´½¨Ö®¡£ + </entry> + </row> + <row> + <entry><literal>'w+'</literal></entry> + <entry> + ¶Áд·½Ê½´ò¿ª£¬½«ÎļþÖ¸ÕëÖ¸ÏòÎļþÍ·²¢½«Îļþ´óС½ØÎªÁã¡£Èç¹ûÎļþ²»´æÔÚÔò³¢ÊÔ´´½¨Ö®¡£ + </entry> + </row> + <row> + <entry><literal>'a'</literal></entry> + <entry> + дÈ뷽ʽ´ò¿ª£¬½«ÎļþÖ¸ÕëÖ¸ÏòÎļþĩβ¡£Èç¹ûÎļþ²»´æÔÚÔò³¢ÊÔ´´½¨Ö®¡£ + </entry> + </row> + <row> + <entry><literal>'a+'</literal></entry> + <entry> + ¶Áд·½Ê½´ò¿ª£¬½«ÎļþÖ¸ÕëÖ¸ÏòÎļþĩβ¡£Èç¹ûÎļþ²»´æÔÚÔò³¢ÊÔ´´½¨Ö®¡£ + </entry> + </row> + </tbody> + </tgroup> + </table> </para> <note> <para> - ¿ÉÒÔÔÚ <parameter>mode</parameter> ÄÚ¼ÓÈë×Öĸ¡®b¡¯¡£ - ËüÖ»ÔÚÇø·Ö¶þ½øÖÆÎļþºÍÎı¾ÎļþµÄϵͳÉÏÓÐÓã¨ÀýÈç Windows¡£Ëü¶ÔÓÚUnix²»Æð×÷Óã©¡£ - Èç¹û²»ÐèÒª£¬¿ÉÒÔºöÂÔ¡£ÍƼöÄúÓá®b¡¯Ê¹ÄúµÄ´úÂë¸üÇá±ã¡£ + <parameter>mode</parameter> ¿ÉÒÔ°üÀ¨×Öĸ + 'b'£¬½öÔÚÇø·Ö¶þ½øÖƺÍÎı¾ÎļþµÄϵͳÏÂÓÐÓã¨ÀýÈç + Windows¡£ÔÚ UNIX ÏÂûÓÐÓã©¡£Èç¹û²»ÐèÒª½«±»ºöÂÔ¡£¹ÄÀøÓû§°üÀ¨ + 'b' ±ê¼ÇÒÔʹ½Å±¾¾ßÓиüºÃµÄÒÆÖ²ÐÔ¡£ </para> </note> <para> - Èç¹ûÄãÒªÔÚ <link linkend="ini.include-path">include_path</link> ÀïËÑË÷ÎļþµÄ»°£¬ - ¿ÉÒÔ½«µÚÈý¸ö²ÎÊý <parameter>use_include_path</parameter> ÉèΪ¡®1¡¯»ò &true;¡£ + Èç¹ûÒ²ÐèÒªÔÚ + <link linkend="ini.include-path">include_path</link> + ÖÐËÑѰÎļþµÄ»°£¬¿ÉÒÔ½«¿ÉÑ¡µÄµÚÈý¸ö²ÎÊý + <parameter>use_include_path</parameter> + ÉèΪ '1' »ò &true;¡£ </para> <para> - The optional fourth <parameter>zcontext</parameter> is used for - specifying tuning parameters and callbacks. + ¿ÉÑ¡µÄµÚËĸö²ÎÊý + <parameter>zcontext</parameter> + ÓÃÓÚÖ¸¶¨µ÷Õû²ÎÊýºÍ»Øµ÷¡£ </para> <simpara> - Èç¹û´ò¿ªÊ§°Ü£¬º¯Êý»á·µ»Ø &false;. + Èç¹û´ò¿ªÊ§°Ü£¬±¾º¯Êý·µ»Ø &false;¡£ </simpara> <para> <example> - <title><function>fopen</function> µÄ·¶Àý</title> + <title><function>fopen</function> Àý×Ó</title> <programlisting role="php"> <![CDATA[ <?php @@ -124,15 +145,13 @@ </example> </para> <simpara> - If you are experiencing problems with reading and writing to - files and you're using the server module version of PHP, remember - to make sure that the files and directories you're using are - accessible to the server process. + Èç¹ûÔÚÓ÷þÎñÆ÷Ä£¿é°æ±¾µÄ PHP + ʱÔÚ´ò¿ªºÍдÈëÎļþÉÏÓöµ½ÎÊÌ⣬¼ÇסҪȷ±£ËùʹÓõÄÎļþÊÇ·þÎñÆ÷½ø³ÌËùÄܹ»·ÃÎʵġ£ </simpara> <para> - ÔÚWindowsƽ̨£¬Ð¡ÐÄ©µôÎļþ·¾¶ÖеÄÈκÎÒ»¸ö·´Ð±¸Ü»òб¸Ü¡£ + ÔÚ Windows ƽ̨ÉÏ£¬ÒªÐ¡ÐÄתÒåÎļþ·¾¶ÖеÄÿ¸ö·´Ð±Ïߣ¬»òÕßÓÃбÏß¡£ <informalexample> - <programlisting role="php"> + <programlisting role="php"> <![CDATA[ <?php $handle = fopen ("c:\\data\\info.txt", "r"); @@ -142,15 +161,8 @@ </informalexample> </para> <simpara> - ²Î¼û <xref linkend="wrappers"/>, - <function>fclose</function>, - <function>fgets</function>, - <function>fsockopen</function>, - <function>file</function>, - <function>file_exists</function>, - <function>is_readable</function>, - <function>socket_set_timeout</function>, and - <function>popen</function>. + ²Î¼û<xref linkend="wrappers"/>£¬<function>fclose</function>£¬<function>fgets</function>£¬<function>fsockopen</function>£¬<function>file</function>£¬<function>file_exists</function>£¬<function>is_readable</function>£¬<function>socket_set_timeout</function> + ºÍ <function>popen</function>¡£ </simpara> </refsect1> </refentry> Index: phpdoc-zh/reference/filesystem/functions/fpassthru.xml diff -u phpdoc-zh/reference/filesystem/functions/fpassthru.xml:1.4 phpdoc-zh/reference/filesystem/functions/fpassthru.xml:1.5 --- phpdoc-zh/reference/filesystem/functions/fpassthru.xml:1.4 Fri Feb 7 21:49:53 2003 +++ phpdoc-zh/reference/filesystem/functions/fpassthru.xml Fri Feb 28 04:30:51 2003 @@ -1,59 +1,59 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.4 $ --> -<!-- $Author: lm92 $ --> -<!-- EN-Revision: 1.2 Maintainer: Liuming Status: ready --> -<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 --> +<!-- $Revision: 1.5 $ --> +<!-- $Author: dallas $ --> +<!-- EN-Revision: 1.5 Maintainer: dallas Status: ready --> +<!-- CREDITS: lm92 --> <refentry id="function.fpassthru"> <refnamediv> <refname>fpassthru</refname> - <refpurpose>°ÑÎļþÖ¸Õë´¦µÄÊ£ÓàµÄÊý¾ÝÈ«²¿Êä³ö</refpurpose> + <refpurpose>Êä³öÎļþÖ¸Õë´¦µÄËùÓÐÊ£ÓàÊý¾Ý</refpurpose> </refnamediv> <refsect1> - <title>ÃèÊö</title> + <title>˵Ã÷</title> <methodsynopsis> <type>int</type><methodname>fpassthru</methodname> <methodparam><type>resource</type><parameter>handle</parameter></methodparam> </methodsynopsis> <simpara> - °´ÎļþÖ¸Õë´Óµ±Ç°µÄλÖöÁÈ¡µ½EOF£¨End of file£©²¢°Ñ½á¹ûдµ½Êä³ö»º³åÆ÷¡£ + ½«¸ø¶¨µÄÎļþÖ¸Õë´Óµ±Ç°µÄλÖöÁÈ¡µ½ EOF ²¢°Ñ½á¹ûдµ½Êä³ö»º³åÇø¡£ </simpara> <simpara> - Èç¹û·¢Éú´íÎó£¬ <function>fpassthru</function> ¾Í»á·µ»Ø &false;¡£ - ·ñÔò£¬ <function>fpassthru</function> ¾Í·µ»Ø´Ó <parameter>handle</parameter> - ×Ö·ûÊýÄ¿ÒÔ¼°´«µÝµ½±ê×¼Êä³ö¡£ + Èç¹û·¢Éú´íÎó£¬ <function>fpassthru</function> ·µ»Ø &false;¡£ + ·ñÔò <function>fpassthru</function> ·µ»Ø´Ó <parameter>handle</parameter> + ¶ÁÈ¡²¢´«µÝµ½Êä³öµÄ×Ö·ûÊýÄ¿¡£ </simpara> <simpara> - ÎļþÖ¸Õë±ØÐëÓÐЧ£¬ÇÒ±ØÐë³É¹¦´ò¿ªÓÉ - <function>fopen</function>£¬ <function>popen</function>£¬»ò - <function>fsockopen</function> Ö¸¶¨µÄÎļþ¡£ - Èç¹ûÄãÒѾÏòÎļþ¼ÐдÈëÁËÊý¾Ý£¬Äã±ØÐëʹÓà <function>rewind</function> - À´ÖØÉèÎļþÖ¸Õëµ½ÎļþµÄ¿ªÍ·¡£ - µ± <function>fpassthru</function> ¶ÁÍêÎļþºó£¬¾Í»á¹Ø±ÕÖ¸Õë¹Ø±Õ - <parameter>handle</parameter> £©¡£ + ÎļþÖ¸Õë±ØÐëÓÐЧ£¬ÇÒ±ØÐëÖ¸ÏòÓÉ + <function>fopen</function>£¬<function>popen</function> »ò + <function>fsockopen</function> ³É¹¦´ò¿ªµÄÎļþ¡£ + Èç¹ûÒѾÏòÎļþдÈëÁËÊý¾Ý£¬¿ÉÄÜÐèÒªµ÷Óà <function>rewind</function> + À´½«ÎļþÖ¸ÕëÖ¸ÏòÎļþÍ·¡£µ± <function>fpassthru</function> + Íê³É¶ÁÈ¡ºó¾Í»á¹Ø±ÕÎļþ£¨Ê¹ <parameter>handle</parameter> ʧЧ£©¡£ </simpara> <simpara> - If you just want to dump the contents of a file to the output buffer, - without first modifying it or seeking to a particular offset, you may - want to use the <function>readfile</function>, which saves you - the <function>fopen</function> call. + Èç¹û¼È²»ÐÞ¸ÄÎļþÒ²²»ÔÚÌØ¶¨Î»ÖüìË÷£¬Ö»Ï뽫ÎļþµÄÄÚÈÝÏÂÔØµ½Êä³ö»º³åÇø£¬Ó¦¸ÃʹÓà + <function>readfile</function>£¬ÕâÑù¿ÉÒÔʡȥ + <function>fopen</function> µ÷Óᣠ</simpara> <note> <para> - When using <function>fpassthru</function> on a binary file on Windows - systems, you should make sure to open the file in binary mode by - appending a <literal>b</literal> to the mode used in the call to - <function>fopen</function>. + µ±ÔÚ Windows + ϵͳÖн« <function>fpassthru</function> + ÓÃÓÚ¶þ½øÖÆÎļþʱ£¬ÒªÈ·±£ÔÚÓà + <function>fopen</function> + ´ò¿ªÎļþʱÔÚ mode Öи½¼ÓÁË + <literal>b</literal> À´½«ÎļþÒÔ¶þ½øÖÆ·½Ê½´ò¿ª¡£ </para> <para> - You are encouraged to use the <literal>b</literal> flag when dealing - with binary files, even if your system does not require it, so that - your scripts will be more portable. + ¹ÄÀøÔÚ´¦Àí¶þ½øÖÆÎļþʱʹÓà + <literal>b</literal> + ±êÖ¾£¬¼´Ê¹ÏµÍ³²¢²»ÐèÒª£¬ÕâÑù¿ÉÒÔʹ½Å±¾µÄÒÆÖ²ÐÔ¸üºÃ¡£ </para> </note> <simpara> - See also <function>readfile</function>, - <function>fopen</function>, <function>popen</function>, and - <function>fsockopen</function> + ²Î¼û + <function>readfile</function>£¬<function>fopen</function>£¬<function>popen</function> + ºÍ <function>fsockopen</function>¡£ </simpara> </refsect1> </refentry>