cvs: phpdoc-zh /reference/filesystem/functions fgetc.xml fgetcsv.xml fileperms.xml filesize.xml flock.xml fnmatch.xml fopen.xml fpassthru.xml
fputs.xml fread.xml fseek.xml fstat.xml
| From: | Dallas Thunder | Date: | Tue, 13 Sep 2005 16:30:44 +0000 |
| Subject: | cvs: phpdoc-zh /reference/filesystem/functions fgetc.xml fgetcsv.xml fileperms.xml filesize.xml flock.xml fnmatch.xml fopen.xml fpassthru.xml fputs.xml fread.xml fseek.xml fstat.xml |
||
| Groups: | php.doc.zh | ||
| Request: | Send a blank email to doc-zh+get-2657@lists.php.net to get a copy of this message | ||
dallas Tue Sep 13 12:30:44 2005 EDT
Modified files:
/phpdoc-zh/reference/filesystem/functions fgetc.xml fgetcsv.xml
fileperms.xml
filesize.xml flock.xml
fnmatch.xml fopen.xml
fpassthru.xml fputs.xml
fread.xml fseek.xml
fstat.xml
Log:
һЩÓÃÓïµÄÐÞÊÎ
http://cvs.php.net/diff.php/phpdoc-zh/reference/filesystem/functions/fgetc.xml?r1=1.6&r2=1.7&ty=u Index: phpdoc-zh/reference/filesystem/functions/fgetc.xml diff -u phpdoc-zh/reference/filesystem/functions/fgetc.xml:1.6 phpdoc-zh/reference/filesystem/functions/fgetc.xml:1.7 --- phpdoc-zh/reference/filesystem/functions/fgetc.xml:1.6 Fri Jul 15 13:17:27 2005 +++ phpdoc-zh/reference/filesystem/functions/fgetc.xml Tue Sep 13 12:30:43 2005 @@ -1,29 +1,28 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.6 $ --> -<!-- $Author: yincheng $ --> +<!-- $Revision: 1.7 $ --> +<!-- $Author: dallas $ --> <!-- EN-Revision: 1.10 Maintainer: dallas Status: ready --> - <refentry id="function.fgetc"> - <refnamediv> - <refname>fgetc</refname> - <refpurpose>´ÓÎļþÖ¸ÕëÖжÁÈ¡×Ö·û</refpurpose> - </refnamediv> - <refsect1> - <title>˵Ã÷</title> - <methodsynopsis> - <type>string</type><methodname>fgetc</methodname> - <methodparam><type>resource</type><parameter>handle</parameter></methodparam> - </methodsynopsis> - <para> - ·µ»ØÒ»¸ö°üº¬ÓÐÒ»¸ö×Ö·ûµÄ×Ö·û´®£¬¸Ã×Ö·û´Ó <parameter>handle</parameter> - Ö¸ÏòµÄÎļþÖеõ½¡£Åöµ½ EOF Ôò·µ»Ø &false;¡£ - </para> - - &fs.validfp.all; - &return.falseproblem; - <para> - <example> - <title><function>fgetc</function> Àý×Ó</title> - <programlisting role="php"> +<refentry id="function.fgetc"> + <refnamediv> + <refname>fgetc</refname> + <refpurpose>´ÓÎļþÖ¸ÕëÖжÁÈ¡×Ö·û</refpurpose> + </refnamediv> + <refsect1> + <title>˵Ã÷</title> + <methodsynopsis> + <type>string</type><methodname>fgetc</methodname> + <methodparam><type>resource</type><parameter>handle</parameter></methodparam> + </methodsynopsis> + <para> + ·µ»ØÒ»¸ö°üº¬ÓÐÒ»¸ö×Ö·ûµÄ×Ö·û´®£¬¸Ã×Ö·û´Ó <parameter>handle</parameter> + Ö¸ÏòµÄÎļþÖеõ½¡£Åöµ½ EOF Ôò·µ»Ø &false;¡£ + </para> + &fs.validfp.all; + &return.falseproblem; + <para> + <example> + <title><function>fgetc</function> Àý×Ó</title> + <programlisting role="php"> <![CDATA[ <?php $fp = fopen('somefile.txt', 'r'); @@ -35,16 +34,16 @@ } ?> ]]> - </programlisting> - </example> - </para> - ¬e.bin-safe; - <para> - ²Î¼û <function>fread</function>£¬<function>fopen</function>£¬<function>popen</function>£¬<function>fsockopen</function> - ºÍ <function>fgets</function>¡£ - </para> - </refsect1> - </refentry> + </programlisting> + </example> + </para> + ¬e.bin-safe; + <para> + ²Î¼û <function>fread</function>£¬<function>fopen</function>£¬<function>popen</function>£¬<function>fsockopen</function> + ºÍ <function>fgets</function>¡£ + </para> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/diff.php/phpdoc-zh/reference/filesystem/functions/fgetcsv.xml?r1=1.5&r2=1.6&ty=u Index: phpdoc-zh/reference/filesystem/functions/fgetcsv.xml diff -u phpdoc-zh/reference/filesystem/functions/fgetcsv.xml:1.5 phpdoc-zh/reference/filesystem/functions/fgetcsv.xml:1.6 --- phpdoc-zh/reference/filesystem/functions/fgetcsv.xml:1.5 Tue Aug 16 09:28:40 2005 +++ phpdoc-zh/reference/filesystem/functions/fgetcsv.xml Tue Sep 13 12:30:43 2005 @@ -1,79 +1,77 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.5 $ --> -<!-- $Author: lm92 $ --> +<!-- $Revision: 1.6 $ --> +<!-- $Author: dallas $ --> <!-- EN-Revision: 1.20 Maintainer: dallas Status: ready --> - <refentry id="function.fgetcsv"> - <refnamediv> - <refname>fgetcsv</refname> - <refpurpose>´ÓÎļþÖ¸ÕëÖжÁÈëÒ»Ðв¢½âÎö CSV ×Ö¶Î</refpurpose> - </refnamediv> - <refsect1> - <title>˵Ã÷</title> - <methodsynopsis> - <type>array</type><methodname>fgetcsv</methodname> - <methodparam><type>int</type><parameter>handle</parameter></methodparam> - <methodparam choice="opt"><type>int</type><parameter>length</parameter></methodparam> - <methodparam choice="opt"><type>string</type><parameter>delimiter</parameter></methodparam> - <methodparam choice="opt"><type>string</type><parameter>enclosure</parameter></methodparam> - </methodsynopsis> - - <para> - <variablelist> - <varlistentry> - <term><parameter>handle</parameter></term> - <listitem> - <simpara> - Ò»¸öÓÉ <function>fopen</function>¡¢<function>popen</function> »ò - <function>fsockopen</function> ²úÉúµÄÓÐЧÎļþÖ¸Õë¡£ - </simpara> - </listitem> - </varlistentry> - <varlistentry> - <term><parameter>length</parameter> £¨¿ÉÑ¡£©</term> - <listitem> - <simpara> - ±ØÐë´óÓÚ CVS ÎļþÄÚ×µÄÒ»ÐС£ÔÚ PHP 5 - ÖиòÎÊýÊÇ¿ÉÑ¡µÄ¡£Èç¹ûºöÂÔ£¨ÔÚ PHP 5.0.4 ÒÔºóµÄ°æ±¾ÖÐÉèΪ - 0£©¸Ã²ÎÊýµÄ»°£¬ÄÇô³¤¶È¾ÍûÓÐÏÞÖÆ£¬²»¹ý¿ÉÄÜ»áÓ°ÏìÖ´ÐÐЧÂÊ¡£ - </simpara> - </listitem> - </varlistentry> - <varlistentry> - <term><parameter>delimiter</parameter> £¨¿ÉÑ¡£©</term> - <listitem> - <simpara> - ÉèÖÃ×ֶηֽç·û£¨Ö»ÔÊÐíÒ»¸ö×Ö·û£©£¬Ä¬ÈÏֵΪ¶ººÅ¡£ - </simpara> - </listitem> - </varlistentry> - <varlistentry> - <term><parameter>enclosure</parameter> £¨¿ÉÑ¡£©</term> - <listitem> - <simpara> - ÉèÖÃ×ֶλ·ÈÆ·û£¨Ö»ÔÊÐíÒ»¸ö×Ö·û£©£¬Ä¬ÈÏֵΪ˫ÒýºÅ¡£¸Ã²ÎÊýÊÇÔÚ PHP 4.3.0 ÖÐÌí¼ÓµÄ¡£ - </simpara> - </listitem> - </varlistentry> - </variablelist> - </para> - - <simpara> - ºÍ <function>fgets</function> ÀàËÆ£¬Ö»³ýÁË - <function>fgetcsv</function> ½âÎö¶ÁÈëµÄÐв¢ÕÒ³ö <acronym>CSV</acronym> - ¸ñʽµÄ×Ö¶ÎÈ»ºó·µ»ØÒ»¸ö°üº¬ÕâЩ×ֶεÄÊý×é¡£ - </simpara> - <simpara> - <function>fgetcsv</function> ³ö´íʱ·µ»Ø &false;£¬°üÀ¨Åöµ½Îļþ½áÊøÊ±¡£ - </simpara> - <note> - <simpara> - CSV ÎļþÖеĿÕÐн«±»·µ»ØÎªÒ»¸ö°üº¬Óе¥¸ö <type>null</type> ×ֶεÄÊý×飬²»»á±»µ±³É´íÎó¡£ - </simpara> - </note> - <para> - <example> - <title>¶ÁÈ¡²¢ÏÔʾ CSV ÎļþµÄÕû¸öÄÚÈÝ</title> - <programlisting role="php"> +<refentry id="function.fgetcsv"> + <refnamediv> + <refname>fgetcsv</refname> + <refpurpose>´ÓÎļþÖ¸ÕëÖжÁÈëÒ»Ðв¢½âÎö CSV ×Ö¶Î</refpurpose> + </refnamediv> + <refsect1> + <title>˵Ã÷</title> + <methodsynopsis> + <type>array</type><methodname>fgetcsv</methodname> + <methodparam><type>int</type><parameter>handle</parameter></methodparam> + <methodparam choice="opt"><type>int</type><parameter>length</parameter></methodparam> + <methodparam choice="opt"><type>string</type><parameter>delimiter</parameter></methodparam> + <methodparam choice="opt"><type>string</type><parameter>enclosure</parameter></methodparam> + </methodsynopsis> + <para> + <variablelist> + <varlistentry> + <term><parameter>handle</parameter></term> + <listitem> + <simpara> + Ò»¸öÓÉ <function>fopen</function>¡¢<function>popen</function> »ò + <function>fsockopen</function> ²úÉúµÄÓÐЧÎļþÖ¸Õë¡£ + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>length</parameter> £¨¿ÉÑ¡£©</term> + <listitem> + <simpara> + ±ØÐë´óÓÚ CVS ÎļþÄÚ×µÄÒ»ÐС£ÔÚ PHP 5 + ÖиòÎÊýÊÇ¿ÉÑ¡µÄ¡£Èç¹ûºöÂÔ£¨ÔÚ PHP 5.0.4 ÒÔºóµÄ°æ±¾ÖÐÉèΪ + 0£©¸Ã²ÎÊýµÄ»°£¬ÄÇô³¤¶È¾ÍûÓÐÏÞÖÆ£¬²»¹ý¿ÉÄÜ»áÓ°ÏìÖ´ÐÐЧÂÊ¡£ + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>delimiter</parameter> £¨¿ÉÑ¡£©</term> + <listitem> + <simpara> + ÉèÖÃ×ֶηֽç·û£¨Ö»ÔÊÐíÒ»¸ö×Ö·û£©£¬Ä¬ÈÏֵΪ¶ººÅ¡£ + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>enclosure</parameter> £¨¿ÉÑ¡£©</term> + <listitem> + <simpara> + ÉèÖÃ×ֶλ·ÈÆ·û£¨Ö»ÔÊÐíÒ»¸ö×Ö·û£©£¬Ä¬ÈÏֵΪ˫ÒýºÅ¡£¸Ã²ÎÊýÊÇÔÚ PHP 4.3.0 ÖÐÌí¼ÓµÄ¡£ + </simpara> + </listitem> + </varlistentry> + </variablelist> + </para> + <simpara> + ºÍ <function>fgets</function> ÀàËÆ£¬Ö»³ýÁË + <function>fgetcsv</function> ½âÎö¶ÁÈëµÄÐв¢ÕÒ³ö <acronym>CSV</acronym> + ¸ñʽµÄ×Ö¶ÎÈ»ºó·µ»ØÒ»¸ö°üº¬ÕâЩ×ֶεÄÊý×é¡£ + </simpara> + <simpara> + <function>fgetcsv</function> ³ö´íʱ·µ»Ø &false;£¬°üÀ¨Åöµ½Îļþ½áÊøÊ±¡£ + </simpara> + <note> + <simpara> + CSV ÎļþÖеĿÕÐн«±»·µ»ØÎªÒ»¸ö°üº¬Óе¥¸ö <type>null</type> ×ֶεÄÊý×飬²»»á±»µ±³É´íÎó¡£ + </simpara> + </note> + <para> + <example> + <title>¶ÁÈ¡²¢ÏÔʾ CSV ÎļþµÄÕû¸öÄÚÈÝ</title> + <programlisting role="php"> <![CDATA[ <?php $row = 1; @@ -89,25 +87,25 @@ fclose($handle); ?> ]]> - </programlisting> - </example> - </para> - <para> - ´Ó PHP 4.3.5 Æð£¬<function>fgetcsv</function> µÄ²Ù×÷ÊǶþ½øÖư²È«µÄ¡£ - </para> - <note> - <simpara> - ¸Ãº¯Êý¶ÔÇøÓòÉèÖÃÊÇÃô¸ÐµÄ¡£±ÈÈç˵ <varname>LANG</varname> ÉèΪ - <literal>en_US.UTF-8</literal> µÄ»°£¬µ¥×Ö½Ú±àÂëµÄÎļþ¾Í»á³öÏÖ¶ÁÈ¡´íÎó¡£ - </simpara> - </note> - ¬e.line-endings; - <para> - ²Î¼û <function>explode</function>£¬<function>file</function>£¬<function>pack</function> - ºÍ <function>fputcsv</function> - </para> - </refsect1> - </refentry> + </programlisting> + </example> + </para> + <para> + ´Ó PHP 4.3.5 Æð£¬<function>fgetcsv</function> µÄ²Ù×÷ÊǶþ½øÖư²È«µÄ¡£ + </para> + <note> + <simpara> + ¸Ãº¯Êý¶ÔÇøÓòÉèÖÃÊÇÃô¸ÐµÄ¡£±ÈÈç˵ <varname>LANG</varname> ÉèΪ + <literal>en_US.UTF-8</literal> µÄ»°£¬µ¥×Ö½Ú±àÂëµÄÎļþ¾Í»á³öÏÖ¶ÁÈ¡´íÎó¡£ + </simpara> + </note> + ¬e.line-endings; + <para> + ²Î¼û <function>explode</function>£¬<function>file</function>£¬<function>pack</function> + ºÍ <function>fputcsv</function> + </para> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/diff.php/phpdoc-zh/reference/filesystem/functions/fileperms.xml?r1=1.4&r2=1.5&ty=u Index: phpdoc-zh/reference/filesystem/functions/fileperms.xml diff -u phpdoc-zh/reference/filesystem/functions/fileperms.xml:1.4 phpdoc-zh/reference/filesystem/functions/fileperms.xml:1.5 --- phpdoc-zh/reference/filesystem/functions/fileperms.xml:1.4 Tue Aug 16 00:40:45 2005 +++ phpdoc-zh/reference/filesystem/functions/fileperms.xml Tue Sep 13 12:30:43 2005 @@ -1,48 +1,48 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.4 $ --> -<!-- $Author: lm92 $ --> +<!-- $Revision: 1.5 $ --> +<!-- $Author: dallas $ --> <!-- EN-Revision: 1.9 Maintainer: dallas Status: ready --> - <refentry id="function.fileperms"> - <refnamediv> - <refname>fileperms</refname> - <refpurpose>È¡µÃÎļþµÄȨÏÞ</refpurpose> - </refnamediv> - <refsect1> - <title>˵Ã÷</title> - <methodsynopsis> - <type>int</type><methodname>fileperms</methodname> - <methodparam><type>string</type><parameter>filename</parameter></methodparam> - </methodsynopsis> - <para> - ·µ»ØÎļþµÄ·ÃÎÊȨÏÞ£¬Èç¹û³ö´íÔò·µ»Ø &false;¡£ - </para> - ¬e.clearstatcache; - &tip.fopen-wrapper.stat; - <example> - <title>Ò԰˽øÖƵÄÐÎʽÏÔʾÎļþµÄȨÏÞ</title> - <programlisting role="php"> +<refentry id="function.fileperms"> + <refnamediv> + <refname>fileperms</refname> + <refpurpose>È¡µÃÎļþµÄȨÏÞ</refpurpose> + </refnamediv> + <refsect1> + <title>˵Ã÷</title> + <methodsynopsis> + <type>int</type><methodname>fileperms</methodname> + <methodparam><type>string</type><parameter>filename</parameter></methodparam> + </methodsynopsis> + <para> + ·µ»ØÎļþµÄ·ÃÎÊȨÏÞ£¬Èç¹û³ö´íÔò·µ»Ø &false;¡£ + </para> + ¬e.clearstatcache; + &tip.fopen-wrapper.stat; + <example> + <title>Ò԰˽øÖƵÄÐÎʽÏÔʾÎļþµÄȨÏÞ</title> + <programlisting role="php"> <![CDATA[ <?php echo substr(sprintf('%o', fileperms('/tmp')), -4); echo substr(sprintf('%o', fileperms('/etc/passwd')), -4); ?> ]]> - </programlisting> - <para>ÉÏÀý½«Êä³ö£º</para> - <screen> + </programlisting> + &example.outputs.similar; + <screen> <![CDATA[ 1777 0644 ]]> - </screen> - </example> - <example> - <title>Êä³öÈ«²¿È¨ÏÞ</title> - <programlisting role="php"> + </screen> + </example> + <example> + <title>Êä³öÈ«²¿È¨ÏÞ</title> + <programlisting role="php"> <![CDATA[ <?php $perms = fileperms('/etc/passwd'); - + if (($perms & 0xC000) == 0xC000) { // Socket $info = 's'; @@ -68,44 +68,44 @@ // Unknown $info = 'u'; } - + // Owner $info .= (($perms & 0x0100) ? 'r' : '-'); $info .= (($perms & 0x0080) ? 'w' : '-'); $info .= (($perms & 0x0040) ? (($perms & 0x0800) ? 's' : 'x' ) : (($perms & 0x0800) ? 'S' : '-')); - + // Group $info .= (($perms & 0x0020) ? 'r' : '-'); $info .= (($perms & 0x0010) ? 'w' : '-'); $info .= (($perms & 0x0008) ? (($perms & 0x0400) ? 's' : 'x' ) : (($perms & 0x0400) ? 'S' : '-')); - + // World $info .= (($perms & 0x0004) ? 'r' : '-'); $info .= (($perms & 0x0002) ? 'w' : '-'); $info .= (($perms & 0x0001) ? (($perms & 0x0200) ? 't' : 'x' ) : (($perms & 0x0200) ? 'T' : '-')); - + echo $info; ?> ]]> - </programlisting> - <para>ÉÏÀý½«Êä³ö£º</para> - <screen> + </programlisting> + &example.outputs.similar; + <screen> <![CDATA[ -r--r--r-- ]]> - </screen> - </example> - <simpara> - ²Î¼û <function>is_readable</function> ºÍ <function>stat</function>¡£ - </simpara> - </refsect1> - </refentry> + </screen> + </example> + <simpara> + ²Î¼û <function>is_readable</function> ºÍ <function>stat</function>¡£ + </simpara> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/diff.php/phpdoc-zh/reference/filesystem/functions/filesize.xml?r1=1.5&r2=1.6&ty=u Index: phpdoc-zh/reference/filesystem/functions/filesize.xml diff -u phpdoc-zh/reference/filesystem/functions/filesize.xml:1.5 phpdoc-zh/reference/filesystem/functions/filesize.xml:1.6 --- phpdoc-zh/reference/filesystem/functions/filesize.xml:1.5 Tue Aug 16 00:35:44 2005 +++ phpdoc-zh/reference/filesystem/functions/filesize.xml Tue Sep 13 12:30:43 2005 @@ -1,36 +1,37 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.5 $ --> -<!-- $Author: lm92 $ --> +<!-- $Revision: 1.6 $ --> +<!-- $Author: dallas $ --> <!-- EN-Revision: 1.7 Maintainer: dallas Status: ready --> - <refentry id="function.filesize"> - <refnamediv> - <refname>filesize</refname> - <refpurpose>È¡µÃÎļþ´óС</refpurpose> - </refnamediv> - <refsect1> - <title>˵Ã÷</title> - <methodsynopsis> - <type>int</type><methodname>filesize</methodname> - <methodparam><type>string</type><parameter>filename</parameter></methodparam> - </methodsynopsis> - <para> - ·µ»ØÎļþ´óСµÄ×Ö½ÚÊý£¬Èç¹û³ö´í·µ»Ø &false; £¨ÔÚ´íÎ󱨸漶±ðΪ <constant>E_WARNING</constant>µÄÇé¿öÏ£©¡£ - </para> - <note> - <simpara> - ÒòΪ PHP µÄÕûÊýÀàÐÍÊÇÓзûºÅµÄ£¬²¢ÇÒ´ó¶àÊýƽ̨ʹÓà 32 - λÕûÊý£¬<function>filesize</function> º¯ÊýÔÚÅöµ½´óÓÚ 2GB - µÄÎļþʱ¿ÉÄܻ᷵»Ø·ÇÔ¤ÆÚµÄ½á¹û¡£¶ÔÓÚ 2GB µ½ 4GB - Ö®¼äµÄÎļþͨ³£¿ÉÒÔʹÓà - <literal>sprintf("%u", filesize($file))</literal> À´¿Ë·þ´ËÎÊÌâ¡£ - </simpara> - </note> - ¬e.clearstatcache; - &tip.fopen-wrapper.stat; - <para> - <example> - <title><function>filesize</function> Àý×Ó</title> - <programlisting role="php"> +<refentry id="function.filesize"> + <refnamediv> + <refname>filesize</refname> + <refpurpose>È¡µÃÎļþ´óС</refpurpose> + </refnamediv> + <refsect1> + <title>˵Ã÷</title> + <methodsynopsis> + <type>int</type><methodname>filesize</methodname> + <methodparam><type>string</type><parameter>filename</parameter></methodparam> + </methodsynopsis> + <para> + ·µ»ØÎļþ´óСµÄ×Ö½ÚÊý£¬Èç¹û³ö´í·µ»Ø &false; ²¢Éú³ÉÒ»Ìõ + <constant>E_WARNING</constant> ¼¶µÄ´íÎó¡£ + </para> + <note> + <simpara> + ÒòΪ PHP µÄÕûÊýÀàÐÍÊÇÓзûºÅµÄ£¬²¢ÇÒ´ó¶àÊýƽ̨ʹÓà 32 + λÕûÊý£¬<function>filesize</function> º¯ÊýÔÚÅöµ½´óÓÚ 2GB + µÄÎļþʱ¿ÉÄܻ᷵»Ø·ÇÔ¤ÆÚµÄ½á¹û¡£¶ÔÓÚ 2GB µ½ 4GB + Ö®¼äµÄÎļþͨ³£¿ÉÒÔʹÓà + <literal>sprintf("%u", filesize($file))</literal> À´¿Ë·þ´ËÎÊÌâ¡£ + </simpara> + </note> + ¬e.clearstatcache; + &tip.fopen-wrapper.stat; + <para> + <example> + <title><function>filesize</function> Àý×Ó</title> + <programlisting role="php"> <![CDATA[ <?php @@ -41,14 +42,14 @@ ?> ]]> - </programlisting> - </example> - </para> - <simpara> - ²Î¼û <function>file_exists</function>¡£ - </simpara> - </refsect1> - </refentry> + </programlisting> + </example> + </para> + <simpara> + ²Î¼û <function>file_exists</function>¡£ + </simpara> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/diff.php/phpdoc-zh/reference/filesystem/functions/flock.xml?r1=1.8&r2=1.9&ty=u Index: phpdoc-zh/reference/filesystem/functions/flock.xml diff -u phpdoc-zh/reference/filesystem/functions/flock.xml:1.8 phpdoc-zh/reference/filesystem/functions/flock.xml:1.9 --- phpdoc-zh/reference/filesystem/functions/flock.xml:1.8 Tue Aug 16 00:30:59 2005 +++ phpdoc-zh/reference/filesystem/functions/flock.xml Tue Sep 13 12:30:43 2005 @@ -1,74 +1,79 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.8 $ --> -<!-- $Author: lm92 $ --> +<!-- $Revision: 1.9 $ --> +<!-- $Author: dallas $ --> <!-- EN-Revision: 1.11 Maintainer: dallas Status: ready --> <!-- CREDITS: lm92 --> - <refentry id="function.flock"> - <refnamediv> - <refname>flock</refname> - <refpurpose>Çá±ãµÄ×ÉѯÎļþËø¶¨</refpurpose> - </refnamediv> - <refsect1> - <title>˵Ã÷</title> - <methodsynopsis> - <type>bool</type><methodname>flock</methodname> - <methodparam><type>int</type><parameter>handle</parameter></methodparam> - <methodparam><type>int</type><parameter>operation</parameter></methodparam> - <methodparam choice="opt"><type>int</type><parameter role="reference">wouldblock</parameter></methodparam> - </methodsynopsis> - <simpara> - PHP Ö§³ÖÒÔ×Éѯ·½Ê½£¨Ò²¾ÍÊÇ˵ËùÓзÃÎʳÌÐò±ØÐëʹÓÃͬһ·½Ê½Ëø¶¨, ·ñÔòËü²»»á¹¤×÷£©Ëø¶¨È«²¿ÎļþµÄÒ»ÖÖÇá±ã·½·¨¡£ - </simpara> - <note> - <para> - ÔÚ Windows Ï <function>flock</function> ½«»áÇ¿ÖÆÖ´ÐС£ - </para> - </note> - <simpara> - <function>flock</function> ²Ù×÷µÄ <parameter>handle</parameter> - ±ØÐëÊÇÒ»¸öÒѾ´ò¿ªµÄÎļþÖ¸Õë¡£<parameter>operation</parameter> - ¿ÉÒÔÊÇÒÔÏÂÖµÖ®Ò»£º - </simpara> - <para> - <itemizedlist> - <listitem> - <simpara> - ҪȡµÃ¹²ÏíËø¶¨£¨¶ÁÈ¡³ÌÐò£©£¬½« - <parameter>operation</parameter> ÉèΪ <constant>LOCK_SH</constant>£¨PHP 4.0.1 ÒÔǰµÄ°æ±¾ÉèÖÃΪ 1£©¡£ - </simpara> - </listitem> - <listitem> - <simpara> - ҪȡµÃ¶ÀÕ¼Ëø¶¨£¨Ð´Èë³ÌÐò£©£¬½« - <parameter>operation</parameter> ÉèΪ <constant>LOCK_EX</constant>£¨PHP 4.0.1 ÒÔǰµÄ°æ±¾ÖÐÉèÖÃΪ 2£©¡£ - </simpara> - </listitem> - <listitem> - <simpara> - ÒªÊÍ·ÅËø¶¨£¨ÎÞÂÛ¹²Ïí»ò¶ÀÕ¼£©£¬½« - <parameter>operation</parameter> ÉèΪ <constant>LOCK_UN</constant>£¨PHP 4.0.1 ÒÔǰµÄ°æ±¾ÖÐÉèÖÃΪ 3£©¡£ - </simpara> - </listitem> - <listitem> - <simpara> - Èç¹ûÄ㲻ϣÍû <function>flock</function> ÔÚËø¶¨Ê±¶ÂÈû£¬Ôò¸ø - <parameter>operation</parameter> ¼ÓÉÏ <constant>LOCK_NB</constant>£¨PHP 4.0.1 ÒÔǰµÄ°æ±¾ÖÐÉèÖÃΪ 4£©¡£ - </simpara> - </listitem> - </itemizedlist> - </para> - <simpara> - <function>flock</function> ÔÊÐíÄãÖ´ÐÐÒ»¸ö¼òµ¥µÄ¿ÉÒÔÔÚÈÎºÎÆ½Ì¨ÖÐʹÓõĶÁÈ¡/дÈëÄ£ÐÍ£¨°üÀ¨´ó²¿·ÖµÄ - Unix ÅÉÉú°æºÍÉõÖÁÊÇ Windows£©¡£Èç¹ûËø¶¨»á¶ÂÈûµÄ»°£¨EWOULDBLOCK ´íÎóÂëÇé¿öÏ£©£¬Ç뽫¿ÉÑ¡µÄµÚÈý¸ö²ÎÊýÉèÖÃΪ &true;¡£Ëø¶¨²Ù×÷Ò²¿ÉÒÔ±» - <function>fclose</function> ÊÍ·Å£¨´úÂëÖ´ÐÐÍê±ÏʱҲ»á×Ô¶¯µ÷Óã©¡£ - </simpara> - <simpara> - &return.success; - </simpara> - <para> - <example> - <title><function>flock</function> Àý×Ó</title> - <programlisting role="php"> +<refentry id="function.flock"> + <refnamediv> + <refname>flock</refname> + <refpurpose>Çá±ãµÄ×ÉѯÎļþËø¶¨</refpurpose> + </refnamediv> + <refsect1> + <title>˵Ã÷</title> + <methodsynopsis> + <type>bool</type><methodname>flock</methodname> + <methodparam><type>int</type><parameter>handle</parameter></methodparam> + <methodparam><type>int</type><parameter>operation</parameter></methodparam> + <methodparam choice="opt"><type>int</type><parameter role="reference">wouldblock</parameter></methodparam> + </methodsynopsis> + <simpara> + PHP Ö§³ÖÒÔ×Éѯ·½Ê½£¨Ò²¾ÍÊÇ˵ËùÓзÃÎʳÌÐò±ØÐëʹÓÃͬһ·½Ê½Ëø¶¨, ·ñÔòËü²»»á¹¤×÷£©Ëø¶¨È«²¿ÎļþµÄÒ»ÖÖÇá±ã·½·¨¡£ + </simpara> + <note> + <para> + ÔÚ Windows Ï <function>flock</function> ½«»áÇ¿ÖÆÖ´ÐС£ + </para> + </note> + <simpara> + <function>flock</function> ²Ù×÷µÄ <parameter>handle</parameter> + ±ØÐëÊÇÒ»¸öÒѾ´ò¿ªµÄÎļþÖ¸Õë¡£<parameter>operation</parameter> + ¿ÉÒÔÊÇÒÔÏÂÖµÖ®Ò»£º + </simpara> + <para> + <itemizedlist> + <listitem> + <simpara> + ҪȡµÃ¹²ÏíËø¶¨£¨¶ÁÈ¡µÄ³ÌÐò£©£¬½« + <parameter>operation</parameter> ÉèΪ + <constant>LOCK_SH</constant>£¨PHP 4.0.1 ÒÔǰµÄ°æ±¾ÉèÖÃΪ 1£©¡£ + </simpara> + </listitem> + <listitem> + <simpara> + ҪȡµÃ¶ÀÕ¼Ëø¶¨£¨Ð´ÈëµÄ³ÌÐò£©£¬½« + <parameter>operation</parameter> ÉèΪ + <constant>LOCK_EX</constant>£¨PHP 4.0.1 ÒÔǰµÄ°æ±¾ÖÐÉèÖÃΪ 2£©¡£ + </simpara> + </listitem> + <listitem> + <simpara> + ÒªÊÍ·ÅËø¶¨£¨ÎÞÂÛ¹²Ïí»ò¶ÀÕ¼£©£¬½« + <parameter>operation</parameter> ÉèΪ + <constant>LOCK_UN</constant>£¨PHP 4.0.1 ÒÔǰµÄ°æ±¾ÖÐÉèÖÃΪ 3£©¡£ + </simpara> + </listitem> + <listitem> + <simpara> + Èç¹û²»Ï£Íû <function>flock</function> ÔÚËø¶¨Ê±¶ÂÈû£¬Ôò¸ø + <parameter>operation</parameter> ¼ÓÉÏ + <constant>LOCK_NB</constant>£¨PHP 4.0.1 ÒÔǰµÄ°æ±¾ÖÐÉèÖÃΪ 4£©¡£ + </simpara> + </listitem> + </itemizedlist> + </para> + <simpara> + <function>flock</function> ÔÊÐíÖ´ÐÐÒ»¸ö¼òµ¥µÄ¿ÉÒÔÔÚÈÎºÎÆ½Ì¨ÖÐʹÓõĶÁÈ¡/дÈëÄ£ÐÍ£¨°üÀ¨´ó²¿·ÖµÄ + Unix ÅÉÉú°æºÍÉõÖÁÊÇ Windows£©¡£Èç¹ûËø¶¨»á¶ÂÈûµÄ»°£¨EWOULDBLOCK + ´íÎóÂëÇé¿öÏ£©£¬¿ÉÑ¡µÄµÚÈý¸ö²ÎÊý»á±»ÉèÖÃΪ &true;¡£Ëø¶¨²Ù×÷Ò²¿ÉÒÔ±» + <function>fclose</function> ÊÍ·Å£¨´úÂëÖ´ÐÐÍê±ÏʱҲ»á×Ô¶¯µ÷Óã©¡£ + </simpara> + <simpara> + &return.success; + </simpara> + <para> + <example> + <title><function>flock</function> Àý×Ó</title> + <programlisting role="php"> <![CDATA[ <?php @@ -85,35 +90,34 @@ ?> ]]> - </programlisting> - </example> - </para> - <note> - <para> - ÓÉÓÚ <function>flock</function> - ÐèÒªÒ»¸öÎļþÖ¸Õ룬 Òò´ËÄã¿ÉÄÜÐèÒªÒ»¸öËø¶¨ÎļþÀ´±£»¤µ½Äã´òËãͨ¹ýдģʽ´ò¿ªÀ´½Ø¶ÏµÄÎļþµÄ·ÃÎÊ£¨ÔÚ - <function>fopen</function> º¯ÊýÖмÓÈë "w" »ò "w+"£©¡£ - </para> - </note> - <warning> - <para> - <function>flock</function> ²»ÄÜÔÚ NFS - ÒÔ¼°ÆäËûµÄÒ»Ð©ÍøÂçÎļþϵͳÖÐÕý³£¹¤×÷¡£Ïêϸ×ÊÁÏÇë¼ì²éÄãµÄ²Ù×÷ϵͳÎĵµ¡£ - </para> - <para> - ÔÚ²¿·Ö²Ù×÷ϵͳÖУ¬<function>flock</function> ÒÔ´¦Àí¼¶Ö´ÐС£µ±ÓÃÒ»¸ö¶àÏ̷߳þÎñÆ÷ - API£¨±ÈÈç ISAPI£©Ê±£¬Äú¿ÉÄܲ»¿ÉÒÔÒÀ¿¿ - <function>flock</function> À´±£»¤Îļþ£¬ÒòΪÔÚͬһ·þÎñÆ÷ÄÚÔËÐÐÔÚÆäËüÏß³ÌµÄ - PHP ½Å±¾¿ÉÒÔ¶Ô¸ÃÎļþ½øÐд¦Àí¡£ - </para> - <para> - <function>flock</function> ²»Ö§³Ö¾ÉµÄÎļþϵͳ£¬Èç <literal>FAT</literal> - ÒÔ¼°ËüµÄÅÉÉúϵͳ¡£Òò´Ë£¬ËüÔÚÕâÖÖÇé¿öϾ³£»á·µ»ØÒ»¸ö &false; - Öµ£¨ÓÈÆäÊÇÖ¸ Windows 98 µÄÓû§£©¡£ - </para> - </warning> - </refsect1> - </refentry> + </programlisting> + </example> + </para> + <note> + <para> + ÓÉÓÚ <function>flock</function> + ÐèÒªÒ»¸öÎļþÖ¸Õ룬 Òò´Ë¿ÉÄܲ»µÃ²»ÓÃÒ»¸öÌØÊâµÄËø¶¨ÎļþÀ´±£»¤´òËãͨ¹ýдģʽ´ò¿ªµÄÎļþµÄ·ÃÎÊ£¨ÔÚ + <function>fopen</function> º¯ÊýÖмÓÈë "w" »ò "w+"£©¡£ + </para> + </note> + <warning> + <para> + <function>flock</function> ²»ÄÜÓÃÓÚ NFS + ÒÔ¼°ÆäËüÒ»Ð©ÍøÂçÎļþϵͳ¡£Ïêϸ×ÊÁϲ鿴×Ô¼º²Ù×÷ϵͳµÄÎĵµ¡£ + </para> + <para> + ÔÚ²¿·Ö²Ù×÷ϵͳÖÐ <function>flock</function> ÒÔ½ø³Ì¼¶ÊµÏÖ¡£µ±ÓÃÒ»¸ö¶àÏ̷߳þÎñÆ÷ + API£¨±ÈÈç ISAPI£©Ê±£¬¿ÉÄܲ»¿ÉÒÔÒÀ¿¿ + <function>flock</function> À´±£»¤Îļþ£¬ÒòΪÔËÐÐÓÚͬһ·þÎñÆ÷ʵÀýÖÐÆäËü²¢ÐÐÏß³ÌµÄ + PHP ½Å±¾¿ÉÒÔ¶Ô¸ÃÎļþ½øÐд¦Àí¡£ + </para> + <para> + <function>flock</function> ²»Ö§³Ö¾ÉµÄÎļþϵͳ£¬Èç <literal>FAT</literal> + ÒÔ¼°ËüµÄÅÉÉúϵͳ¡£Òò´Ë£¬´Ë»·¾³ÏÂ×ÜÊÇ·µ»Ø &false;£¨ÓÈÆäÊÇ¶Ô Windows 98 Óû§À´Ëµ£©¡£ + </para> + </warning> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/diff.php/phpdoc-zh/reference/filesystem/functions/fnmatch.xml?r1=1.5&r2=1.6&ty=u Index: phpdoc-zh/reference/filesystem/functions/fnmatch.xml diff -u phpdoc-zh/reference/filesystem/functions/fnmatch.xml:1.5 phpdoc-zh/reference/filesystem/functions/fnmatch.xml:1.6 --- phpdoc-zh/reference/filesystem/functions/fnmatch.xml:1.5 Tue Aug 16 03:34:26 2005 +++ phpdoc-zh/reference/filesystem/functions/fnmatch.xml Tue Sep 13 12:30:43 2005 @@ -1,42 +1,40 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.5 $ --> -<!-- $Author: lm92 $ --> +<!-- $Revision: 1.6 $ --> +<!-- $Author: dallas $ --> <!-- EN-Revision: 1.10 Maintainer: dallas Status: ready --> - <refentry id="function.fnmatch"> - <refnamediv> - <refname>fnmatch</refname> - <refpurpose>ÓÃģʽƥÅäÎļþÃû</refpurpose> - </refnamediv> - <refsect1> - <title>˵Ã÷</title> - <methodsynopsis> - <type>bool</type><methodname>fnmatch</methodname> - <methodparam><type>string</type><parameter>pattern</parameter></methodparam> - <methodparam><type>string</type><parameter>string</parameter></methodparam> - <methodparam choice="opt"><type>int</type><parameter>flags</parameter></methodparam> - </methodsynopsis> - <para> - <function>fnmatch</function> - ¼ì²é´«ÈëµÄ - <parameter>string</parameter> - ÊÇ·ñÆ¥Å䏸³öµÄ shell ͳÅä·û - <parameter>pattern</parameter>¡£ - </para> - <para> - ´Ëº¯Êý¶ÔÓÚÎļþÃûÓÈÆäÓÐÓ㬵«Ò²¿ÉÒÔÓÃÓÚÆÕͨµÄ×Ö·û´®¡£ÆÕͨÓû§¿ÉÄÜϰ¹ßÓÚ - shell ģʽ»òÕßÖÁÉÙÆäÖÐ×î¼òµ¥µÄÐÎʽ - <literal>'?'</literal> ºÍ <literal>'*'</literal> - ͨÅä·û£¬Òò´ËʹÓà - <function>fnmatch</function> - À´´úÌæ <function>ereg</function> »òÕß - <function>preg_match</function> - À´½øÐÐǰ¶ËËÑË÷±í´ïʽÊäÈë¶ÔÓڷdzÌÐòÔ±Óû§¸ü¼Ó·½±ã¡£ - </para> - <example> - <title> - Óà shell ÖеÄͨÅä·ûģʽƥÅäÀ´¼ì²éÑÕÉ« - </title> - <programlisting role="php"> +<refentry id="function.fnmatch"> + <refnamediv> + <refname>fnmatch</refname> + <refpurpose>ÓÃģʽƥÅäÎļþÃû</refpurpose> + </refnamediv> + <refsect1> + <title>˵Ã÷</title> + <methodsynopsis> + <type>bool</type><methodname>fnmatch</methodname> + <methodparam><type>string</type><parameter>pattern</parameter></methodparam> + <methodparam><type>string</type><parameter>string</parameter></methodparam> + <methodparam choice="opt"><type>int</type><parameter>flags</parameter></methodparam> + </methodsynopsis> + <para> + <function>fnmatch</function> + ¼ì²é´«ÈëµÄ + <parameter>string</parameter> + ÊÇ·ñÆ¥Å䏸³öµÄ shell ͳÅä·û + <parameter>pattern</parameter>¡£ + </para> + <para> + ´Ëº¯Êý¶ÔÓÚÎļþÃûÓÈÆäÓÐÓ㬵«Ò²¿ÉÒÔÓÃÓÚÆÕͨµÄ×Ö·û´®¡£ÆÕͨÓû§¿ÉÄÜϰ¹ßÓÚ + shell ģʽ»òÕßÖÁÉÙÆäÖÐ×î¼òµ¥µÄÐÎʽ + <literal>'?'</literal> ºÍ <literal>'*'</literal> + ͨÅä·û£¬Òò´ËʹÓà + <function>fnmatch</function> + À´´úÌæ <function>ereg</function> »òÕß + <function>preg_match</function> + À´½øÐÐǰ¶ËËÑË÷±í´ïʽÊäÈë¶ÔÓڷdzÌÐòÔ±Óû§¸ü¼Ó·½±ã¡£ + </para> + <example> + <title>Óà shell ÖеÄͨÅä·ûģʽƥÅäÀ´¼ì²éÑÕÉ«</title> + <programlisting role="php"> <![CDATA[ <?php if (fnmatch("*gr[ae]y", $color)) { @@ -44,20 +42,20 @@ } ?> ]]> - </programlisting> - </example> - <warning> - <para> - Ŀǰ¸Ãº¯ÊýÎÞ·¨ÔÚ Windows »òÆäËü·Ç POSIX ¼æÈݵÄϵͳÉÏʹÓà - </para> - </warning> - <para> - ²Î¼û - <function>glob</function>£¬<function>ereg</function>£¬<function>preg_match</function> - ºÍ UNIX ÖÐ <literal>fnmatch(3)</literal> µÄÊÖ²áÖеıêÖ¾Ãû£¨Ö»Òª±¾ÎĵµÖл¹Î´°üÀ¨ËüÃÇ<!-- TODO hartmut -->£©¡£ - </para> - </refsect1> - </refentry> + </programlisting> + </example> + <warning> + <para> + Ŀǰ¸Ãº¯ÊýÎÞ·¨ÔÚ Windows »òÆäËü·Ç POSIX ¼æÈݵÄϵͳÉÏʹÓᣠ+ </para> + </warning> + <para> + ²Î¼û + <function>glob</function>£¬<function>ereg</function>£¬<function>preg_match</function> + ºÍ Unix ÖÐ <literal>fnmatch(3)</literal> µÄÊÖ²áÖеıêÖ¾Ãû£¨Ö»Òª±¾ÎĵµÖл¹Î´°üÀ¨ËüÃÇ£©¡£ + </para> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/diff.php/phpdoc-zh/reference/filesystem/functions/fopen.xml?r1=1.7&r2=1.8&ty=u Index: phpdoc-zh/reference/filesystem/functions/fopen.xml diff -u phpdoc-zh/reference/filesystem/functions/fopen.xml:1.7 phpdoc-zh/reference/filesystem/functions/fopen.xml:1.8 --- phpdoc-zh/reference/filesystem/functions/fopen.xml:1.7 Tue Aug 16 00:19:29 2005 +++ phpdoc-zh/reference/filesystem/functions/fopen.xml Tue Sep 13 12:30:43 2005 @@ -1,204 +1,199 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.7 $ --> -<!-- $Author: lm92 $ --> +<!-- $Revision: 1.8 $ --> +<!-- $Author: dallas $ --> <!-- EN-Revision: 1.27 Maintainer: dallas Status: ready --> <!-- CREDITS: lm92 --> - <refentry id="function.fopen"> - <refnamediv> - <refname>fopen</refname> - <refpurpose>´ò¿ªÎļþ»òÕß URL</refpurpose> - </refnamediv> - <refsect1> - <title>˵Ã÷</title> - <methodsynopsis> - <type>resource</type><methodname>fopen</methodname> - <methodparam><type>string</type><parameter>filename</parameter></methodparam> - <methodparam><type>string</type><parameter>mode</parameter></methodparam> - <methodparam choice="opt"><type>bool</type><parameter>use_include_path</parameter></methodparam> - <methodparam choice="opt"><type>resource</type><parameter>zcontext</parameter></methodparam> - </methodsynopsis> - <simpara> - <function>fopen</function> ½« - <parameter>filename</parameter> - Ö¸¶¨µÄÃû×Ö×ÊÔ´°ó¶¨µ½Ò»¸öÁ÷ÉÏ¡£Èç¹û - <parameter>filename</parameter> - ÊÇ "scheme://..." µÄ¸ñʽ£¬Ôò±»µ±³ÉÒ»¸ö - URL£¬PHP ½«ËÑË÷ÐÒé´¦ÀíÆ÷£¨Ò²±»³ÆÎª·â×°ÐÒ飩À´´¦Àí´Ëģʽ¡£Èç¹û¸ÃÐÒéÉÐδע²á·â×°ÐÒ飬PHP - ½«·¢³öÒ»ÌõÏûÏ¢À´°ïÖú¼ì²é½Å±¾ÖÐDZÔÚµÄÎÊÌâ²¢½« - <parameter>filename</parameter> - µ±³ÉÒ»¸öÆÕͨµÄÎļþÃû¼ÌÐøÖ´ÐÐÏÂÈ¥¡£ - </simpara> - <simpara> - Èç¹û PHP ÈÏΪ - <parameter>filename</parameter> - Ö¸¶¨µÄÊÇÒ»¸ö±¾µØÎļþ£¬½«³¢ÊÔÔÚ¸ÃÎļþÉÏ´ò¿ªÒ»¸öÁ÷¡£¸ÃÎļþ±ØÐëÊÇ - PHP ¿ÉÒÔ·ÃÎʵģ¬Òò´ËÐèҪȷÈÏÎļþ·ÃÎÊȨÏÞÔÊÐí¸Ã·ÃÎÊ¡£Èç¹û¼¤»îÁË - &safemode; »òÕß - <link linkend="ini.open-basedir">open_basedir</link> - Ôò»áÓ¦ÓýøÒ»²½µÄÏÞÖÆ¡£ - </simpara> - <simpara> - Èç¹û PHP ÈÏΪ - <parameter>filename</parameter> - Ö¸¶¨µÄÊÇÒ»¸öÒÑ×¢²áµÄÐÒ飬¶ø¸ÃÐÒé±»×¢²áΪһ¸öÍøÂç - URL£¬PHP ½«¼ì²é²¢È·ÈÏ - <link linkend="ini.allow-url-fopen">allow_url_fopen</link> - Òѱ»¼¤»î¡£Èç¹û¹Ø±ÕÁË£¬PHP ½«·¢³öÒ»¸ö¾¯¸æ£¬¶ø fopen µÄµ÷ÓÃÔòʧ°Ü¡£ - </simpara> - <note> - <simpara> - ËùÖ§³ÖµÄÐÒéÁбí¼û<xref linkend="wrappers"/>¡£Ä³Ð©ÐÒ飨Ҳ±»³ÆÎª - <literal>wrappers</literal>£©Ö§³Ö - <literal>context</literal> ºÍ &php.ini; - Ñ¡Ïî¡£²Î¼ûÏàÓ¦µÄÒ³ÃæÄÄЩѡÏî¿ÉÒÔ±»É趨¡££¨Ò²¾ÍÊÇ - &php.ini; µÄÖµ - <literal>user_agent</literal> ÓÃÔÚ <literal>http</literal> ÐÒéÖС££©ÓÐ¹Ø - </simpara> - </note> - ¬e.context-support; - <note> - <simpara> - ×Ô PHP 4.3.2 - Æð£¬¶ÔËùÓÐÇø±ð¶þ½øÖƺÍÎı¾Ä£Ê½µÄƽ̨ĬÈÏģʽ¶¼±»ÉèΪ¶þ½øÖÆÄ£Ê½¡£Èç¹ûÄãÔÚÉý¼¶ºó½Å±¾Åöµ½ÎÊÌ⣬³¢ÊÔÔÝʱʹÓà - <literal>'t'</literal> ±ê¼Ç£¬Ö±µ½ËùÓеĽű¾¶¼ÕÕÒÔÏÂËù˵µÄ¸ÄΪ¸ü¾ßÒÆÖ²ÐÔÒÔºó¡£ - </simpara> - </note> - <para> - <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> - <row> - <entry><literal>'x'</literal></entry> - <entry> - ´´½¨²¢ÒÔдÈ뷽ʽ´ò¿ª£¬½«ÎļþÖ¸ÕëÖ¸ÏòÎļþÍ·¡£Èç¹ûÎļþÒÑ´æÔÚ£¬Ôò - <function>fopen</function> µ÷ÓÃʧ°Ü²¢·µ»Ø &false;£¬²¢Éú³ÉÒ»Ìõ - <constant>E_WARNING</constant> ¼¶±ðµÄ´íÎóÐÅÏ¢¡£Èç¹ûÎļþ²»´æÔÚÔò³¢ÊÔ´´½¨Ö®¡£ÕâºÍ¸ø - µ×²ãµÄ <literal>open(2)</literal> ϵͳµ÷ÓÃÖ¸¶¨ - <literal>O_EXCL|O_CREAT</literal> ±ê¼ÇÊǵȼ۵ġ£´ËÑ¡Ïî±» - PHP 4.3.2 ÒÔ¼°ÒÔºóµÄ°æ±¾ËùÖ§³Ö£¬½öÄÜÓÃÓÚ±¾µØÎļþ¡£ - </entry> - </row> - <row> - <entry><literal>'x+'</literal></entry> - <entry> - ´´½¨²¢ÒÔ¶Áд·½Ê½´ò¿ª£¬½«ÎļþÖ¸ÕëÖ¸ÏòÎļþÍ·¡£Èç¹ûÎļþÒÑ´æÔÚ£¬Ôò - <function>fopen</function> µ÷ÓÃʧ°Ü²¢·µ»Ø &false;£¬²¢Éú³ÉÒ»Ìõ - <constant>E_WARNING</constant> ¼¶±ðµÄ´íÎóÐÅÏ¢¡£Èç¹ûÎļþ²»´æÔÚÔò³¢ÊÔ´´½¨Ö®¡£ÕâºÍ¸ø - µ×²ãµÄ <literal>open(2)</literal> ϵͳµ÷ÓÃÖ¸¶¨ - <literal>O_EXCL|O_CREAT</literal> ±ê¼ÇÊǵȼ۵ġ£´ËÑ¡Ïî±» - PHP 4.3.2 ÒÔ¼°ÒÔºóµÄ°æ±¾ËùÖ§³Ö£¬½öÄÜÓÃÓÚ±¾µØÎļþ¡£ - </entry> - </row> - </tbody> - </tgroup> - </table> - </para> - <note> - <para> - ²»Í¬µÄ²Ù×÷ϵͳ¼Ò×å¾ßÓв»Í¬µÄÐнáÊøÏ°¹ß¡£µ±ÄãдÈëÒ»¸öÎı¾Îļþ²¢Ïë²åÈëÒ»¸öÐÂÐÐʱ£¬ÄãÐèҪʹÓ÷ûºÏÄã²Ù×÷ϵͳµÄÐнáÊø·ûºÅ¡£»ùÓÚ - Unix µÄϵͳʹÓà <literal>\n</literal> - ×÷ΪÐнáÊø×Ö·û£¬»ùÓÚ Windows µÄϵͳʹÓà <literal>\r\n</literal> - ×÷ΪÐнáÊø×Ö·û£¬»ùÓÚ Macintosh µÄϵͳʹÓà <literal>\r</literal> - ×÷ΪÐнáÊø×Ö·û¡£ - </para> - <para> - Èç¹ûдÈëÎļþʱʹÓÃÁË´íÎóµÄÐнáÊø·ûºÅ£¬ÔòÆäËüÓ¦ÓóÌÐò´ò¿ªÕâЩÎļþʱ¿ÉÄÜ»á±íÏֵúܹÖÒì¡£ - </para> - <para> - Windows ÏÂÌṩÁËÒ»¸öÎı¾×ª»»±ê¼Ç£¨<literal>'t'</literal>£©¿ÉÒÔ͸Ã÷µØ½« - <literal>\n</literal> ת»»Îª <literal>\r\n</literal>¡£Óë´Ë¶ÔÓ¦Ä㻹¿ÉÒÔʹÓà - <literal>'b'</literal> À´Ç¿ÖÆÊ¹Óöþ½øÖÆÄ£Ê½£¬ÕâÑù¾Í²»»áת»»ÄãµÄÊý¾Ý¡£ÒªÊ¹ÓÃÕâЩ±ê¼Ç£¬ÒªÃ´Óà - <literal>'b'</literal> »òÕßÓà <literal>'t'</literal> ×÷Ϊ - <parameter>mode</parameter> ²ÎÊýµÄ×îºóÒ»¸ö×Ö·û¡£ - </para> - <para> - ĬÈϵÄת»»Ä£Ê½ÒÀÀµÓÚ SAPI ºÍÄãʹÓÃµÄ PHP - °æ±¾£¬Òò´ËΪÁ˱ãÓÚÒÆÖ²¹ÄÀøÄã×ÜÊÇÖ¸¶¨Ç¡µ±µÄ±ê¼Ç¡£µ±²Ù×÷ÒÔ - <literal>\n</literal> ×÷ΪÐнáÊø¶¨½ç·ûµÄ´¿Îı¾Îļþʱ£¬Èç¹ûÄ㻹ÆÚÍûÕâЩÎļþ¿ÉÒÔÓÃÓÚÆäËüÓ¦ÓóÌÐòÀýÈç - Notepad£¬ÔòÓ¦¸ÃÔڽű¾ÖÐʹÓà <literal>'t'</literal> - ģʽ¡£ÔÚËùÓÐÆäËüÇé¿öÏÂʹÓà <literal>'b'</literal>¡£ - </para> - <para> - ÔÚ²Ù×÷¶þ½øÖÆÎļþʱÈç¹ûûÓÐÖ¸¶¨ <literal>'b'</literal> - ±ê¼Ç£¬¿ÉÄÜ»áÅöµ½Ò»Ð©Ææ¹ÖµÄÎÊÌ⣬°üÀ¨»µµôµÄͼƬÎļþÒÔ¼°¹ØÓÚ - <literal>\r\n</literal> ×Ö·ûµÄÆæ¹ÖÎÊÌâ¡£ - </para> - </note> - <note> - <para> - ÎªÒÆÖ²ÐÔ¿¼ÂÇ£¬Ç¿ÁÒ½¨ÒéÔÚÓà <function>fopen</function> - ´ò¿ªÎļþʱ×ÜÊÇʹÓà <literal>'b'</literal> ±ê¼Ç¡£ - </para> - </note> - <note> - <para> - ÔÙÒ»´Î£¬ÎªÒÆÖ²ÐÔ¿¼ÂÇ£¬Ç¿ÁÒ½¨ÒéÄãÖØÐ´ÄÇЩÒÀÀµÓÚ - <literal>'t'</literal> ģʽµÄ´úÂëʹÆäʹÓÃÕýÈ·µÄÐнáÊø·û²¢¸Ä³É - <literal>'b'</literal> ģʽ¡£ - </para> - </note> - <para> - Èç¹ûÒ²ÐèÒªÔÚ - <link linkend="ini.include-path">include_path</link> - ÖÐËÑѰÎļþµÄ»°£¬¿ÉÒÔ½«¿ÉÑ¡µÄµÚÈý¸ö²ÎÊý - <parameter>use_include_path</parameter> - ÉèΪ '1' »ò &true;¡£ - </para> - <simpara> - Èç¹û´ò¿ªÊ§°Ü£¬±¾º¯Êý·µ»Ø &false;¡£ - </simpara> - <para> - <example> - <title><function>fopen</function> Àý×Ó</title> - <programlisting role="php"> +<refentry id="function.fopen"> + <refnamediv> + <refname>fopen</refname> + <refpurpose>´ò¿ªÎļþ»òÕß URL</refpurpose> + </refnamediv> + <refsect1> + <title>˵Ã÷</title> + <methodsynopsis> + <type>resource</type><methodname>fopen</methodname> + <methodparam><type>string</type><parameter>filename</parameter></methodparam> + <methodparam><type>string</type><parameter>mode</parameter></methodparam> + <methodparam choice="opt"><type>bool</type><parameter>use_include_path</parameter></methodparam> + <methodparam choice="opt"><type>resource</type><parameter>zcontext</parameter></methodparam> + </methodsynopsis> + <simpara> + <function>fopen</function> ½« + <parameter>filename</parameter> + Ö¸¶¨µÄÃû×Ö×ÊÔ´°ó¶¨µ½Ò»¸öÁ÷ÉÏ¡£Èç¹û + <parameter>filename</parameter> + ÊÇ "scheme://..." µÄ¸ñʽ£¬Ôò±»µ±³ÉÒ»¸ö + URL£¬PHP ½«ËÑË÷ÐÒé´¦ÀíÆ÷£¨Ò²±»³ÆÎª·â×°ÐÒ飩À´´¦Àí´Ëģʽ¡£Èç¹û¸ÃÐÒéÉÐδע²á·â×°ÐÒ飬PHP + ½«·¢³öÒ»ÌõÏûÏ¢À´°ïÖú¼ì²é½Å±¾ÖÐDZÔÚµÄÎÊÌâ²¢½« + <parameter>filename</parameter> + µ±³ÉÒ»¸öÆÕͨµÄÎļþÃû¼ÌÐøÖ´ÐÐÏÂÈ¥¡£ + </simpara> + <simpara> + Èç¹û PHP ÈÏΪ + <parameter>filename</parameter> + Ö¸¶¨µÄÊÇÒ»¸ö±¾µØÎļþ£¬½«³¢ÊÔÔÚ¸ÃÎļþÉÏ´ò¿ªÒ»¸öÁ÷¡£¸ÃÎļþ±ØÐëÊÇ + PHP ¿ÉÒÔ·ÃÎʵģ¬Òò´ËÐèҪȷÈÏÎļþ·ÃÎÊȨÏÞÔÊÐí¸Ã·ÃÎÊ¡£Èç¹û¼¤»îÁË&safemode;»òÕß + <link linkend="ini.open-basedir">open_basedir</link> + Ôò»áÓ¦ÓýøÒ»²½µÄÏÞÖÆ¡£ + </simpara> + <simpara> + Èç¹û PHP ÈÏΪ + <parameter>filename</parameter> + Ö¸¶¨µÄÊÇÒ»¸öÒÑ×¢²áµÄÐÒ飬¶ø¸ÃÐÒé±»×¢²áΪһ¸öÍøÂç + URL£¬PHP ½«¼ì²é²¢È·ÈÏ + <link linkend="ini.allow-url-fopen">allow_url_fopen</link> + Òѱ»¼¤»î¡£Èç¹û¹Ø±ÕÁË£¬PHP ½«·¢³öÒ»¸ö¾¯¸æ£¬¶ø fopen µÄµ÷ÓÃÔòʧ°Ü¡£ + </simpara> + <note> + <simpara> + ËùÖ§³ÖµÄÐÒéÁбí¼û<xref linkend="wrappers"/>¡£Ä³Ð©ÐÒ飨Ҳ±»³ÆÎª + <literal>wrappers</literal>£©Ö§³Ö + <literal>context</literal> ºÍ£¯»ò &php.ini; + Ñ¡Ïî¡£²Î¼ûÏàÓ¦µÄÒ³ÃæÄÄЩѡÏî¿ÉÒÔ±»É趨£¨ÀýÈç &php.ini; ÖÐÓÃÓÚ + <literal>http</literal> wrapper µÄ <literal>user_agent</literal> Öµ£©¡£ + </simpara> + </note> + ¬e.context-support; + <note> + <simpara> + ×Ô PHP 4.3.2 + Æð£¬¶ÔËùÓÐÇø±ð¶þ½øÖƺÍÎı¾Ä£Ê½µÄƽ̨ĬÈÏģʽ¶¼±»ÉèΪ¶þ½øÖÆÄ£Ê½¡£Èç¹ûÔÚÉý¼¶ºó½Å±¾Åöµ½ÎÊÌ⣬³¢ÊÔÔÝʱʹÓà + <literal>'t'</literal> ±ê¼Ç£¬Ö±µ½ËùÓеĽű¾¶¼ÕÕÒÔÏÂËù˵µÄ¸ÄΪ¸ü¾ßÒÆÖ²ÐÔÒÔºó¡£ + </simpara> + </note> + <para> + <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> + <row> + <entry><literal>'x'</literal></entry> + <entry> + ´´½¨²¢ÒÔдÈ뷽ʽ´ò¿ª£¬½«ÎļþÖ¸ÕëÖ¸ÏòÎļþÍ·¡£Èç¹ûÎļþÒÑ´æÔÚ£¬Ôò + <function>fopen</function> µ÷ÓÃʧ°Ü²¢·µ»Ø &false;£¬²¢Éú³ÉÒ»Ìõ + <constant>E_WARNING</constant> ¼¶±ðµÄ´íÎóÐÅÏ¢¡£Èç¹ûÎļþ²»´æÔÚÔò³¢ÊÔ´´½¨Ö®¡£ÕâºÍ¸ø + µ×²ãµÄ <literal>open(2)</literal> ϵͳµ÷ÓÃÖ¸¶¨ + <literal>O_EXCL|O_CREAT</literal> ±ê¼ÇÊǵȼ۵ġ£´ËÑ¡Ïî±» + PHP 4.3.2 ÒÔ¼°ÒÔºóµÄ°æ±¾ËùÖ§³Ö£¬½öÄÜÓÃÓÚ±¾µØÎļþ¡£ + </entry> + </row> + <row> + <entry><literal>'x+'</literal></entry> + <entry> + ´´½¨²¢ÒÔ¶Áд·½Ê½´ò¿ª£¬½«ÎļþÖ¸ÕëÖ¸ÏòÎļþÍ·¡£Èç¹ûÎļþÒÑ´æÔÚ£¬Ôò + <function>fopen</function> µ÷ÓÃʧ°Ü²¢·µ»Ø &false;£¬²¢Éú³ÉÒ»Ìõ + <constant>E_WARNING</constant> ¼¶±ðµÄ´íÎóÐÅÏ¢¡£Èç¹ûÎļþ²»´æÔÚÔò³¢ÊÔ´´½¨Ö®¡£ÕâºÍ¸ø + µ×²ãµÄ <literal>open(2)</literal> ϵͳµ÷ÓÃÖ¸¶¨ + <literal>O_EXCL|O_CREAT</literal> ±ê¼ÇÊǵȼ۵ġ£´ËÑ¡Ïî±» + PHP 4.3.2 ÒÔ¼°ÒÔºóµÄ°æ±¾ËùÖ§³Ö£¬½öÄÜÓÃÓÚ±¾µØÎļþ¡£ + </entry> + </row> + </tbody> + </tgroup> + </table> + </para> + <note> + <para> + ²»Í¬µÄ²Ù×÷ϵͳ¼Ò×å¾ßÓв»Í¬µÄÐнáÊøÏ°¹ß¡£µ±Ð´ÈëÒ»¸öÎı¾Îļþ²¢Ïë²åÈëÒ»¸öÐÂÐÐʱ£¬ÐèҪʹÓ÷ûºÏ²Ù×÷ϵͳµÄÐнáÊø·ûºÅ¡£»ùÓÚ + Unix µÄϵͳʹÓà <literal>\n</literal> + ×÷ΪÐнáÊø×Ö·û£¬»ùÓÚ Windows µÄϵͳʹÓà <literal>\r\n</literal> + ×÷ΪÐнáÊø×Ö·û£¬»ùÓÚ Macintosh µÄϵͳʹÓà <literal>\r</literal> + ×÷ΪÐнáÊø×Ö·û¡£ + </para> + <para> + Èç¹ûдÈëÎļþʱʹÓÃÁË´íÎóµÄÐнáÊø·ûºÅ£¬ÔòÆäËüÓ¦ÓóÌÐò´ò¿ªÕâЩÎļþʱ¿ÉÄÜ»á±íÏֵúܹÖÒì¡£ + </para> + <para> + Windows ÏÂÌṩÁËÒ»¸öÎı¾×ª»»±ê¼Ç£¨<literal>'t'</literal>£©¿ÉÒÔ͸Ã÷µØ½« + <literal>\n</literal> ת»»Îª <literal>\r\n</literal>¡£Óë´Ë¶ÔÓ¦»¹¿ÉÒÔʹÓà + <literal>'b'</literal> À´Ç¿ÖÆÊ¹Óöþ½øÖÆÄ£Ê½£¬ÕâÑù¾Í²»»áת»»Êý¾Ý¡£ÒªÊ¹ÓÃÕâЩ±ê¼Ç£¬ÒªÃ´Óà + <literal>'b'</literal> »òÕßÓà <literal>'t'</literal> ×÷Ϊ + <parameter>mode</parameter> ²ÎÊýµÄ×îºóÒ»¸ö×Ö·û¡£ + </para> + <para> + ĬÈϵÄת»»Ä£Ê½ÒÀÀµÓÚ SAPI ºÍËùʹÓÃµÄ PHP + °æ±¾£¬Òò´ËΪÁ˱ãÓÚÒÆÖ²¹ÄÀø×ÜÊÇÖ¸¶¨Ç¡µ±µÄ±ê¼Ç¡£Èç¹ûÊDzÙ×÷´¿Îı¾Îļþ²¢Ôڽű¾ÖÐʹÓÃÁË + <literal>\n</literal> ×÷ΪÐнáÊø·û£¬µ«»¹ÒªÆÚÍûÕâЩÎļþ¿ÉÒÔ±»ÆäËüÓ¦ÓóÌÐòÀýÈç + Notepad ¶ÁÈ¡£¬ÔòÔÚ mode ÖÐʹÓà + <literal>'t'</literal>¡£ÔÚËùÓÐÆäËüÇé¿öÏÂʹÓà <literal>'b'</literal>¡£ + </para> + <para> + ÔÚ²Ù×÷¶þ½øÖÆÎļþʱÈç¹ûûÓÐÖ¸¶¨ <literal>'b'</literal> + ±ê¼Ç£¬¿ÉÄÜ»áÅöµ½Ò»Ð©Ææ¹ÖµÄÎÊÌ⣬°üÀ¨»µµôµÄͼƬÎļþÒÔ¼°¹ØÓÚ + <literal>\r\n</literal> ×Ö·ûµÄÆæ¹ÖÎÊÌâ¡£ + </para> + </note> + <note> + <para> + ÎªÒÆÖ²ÐÔ¿¼ÂÇ£¬Ç¿ÁÒ½¨ÒéÔÚÓà <function>fopen</function> + ´ò¿ªÎļþʱ×ÜÊÇʹÓà <literal>'b'</literal> ±ê¼Ç¡£ + </para> + </note> + <note> + <para> + ÔÙÒ»´Î£¬ÎªÒÆÖ²ÐÔ¿¼ÂÇ£¬Ç¿ÁÒ½¨ÒéÄãÖØÐ´ÄÇЩÒÀÀµÓÚ + <literal>'t'</literal> ģʽµÄ´úÂëʹÆäʹÓÃÕýÈ·µÄÐнáÊø·û²¢¸Ä³É + <literal>'b'</literal> ģʽ¡£ + </para> + </note> + <para> + Èç¹ûÒ²ÐèÒªÔÚ + <link linkend="ini.include-path">include_path</link> + ÖÐËÑѰÎļþµÄ»°£¬¿ÉÒÔ½«¿ÉÑ¡µÄµÚÈý¸ö²ÎÊý + <parameter>use_include_path</parameter> + ÉèΪ '1' »ò &true;¡£ + </para> + <simpara> + Èç¹û´ò¿ªÊ§°Ü£¬±¾º¯Êý·µ»Ø &false;¡£ + </simpara> + <para> + <example> + <title><function>fopen</function> Àý×Ó</title> + <programlisting role="php"> <![CDATA[ <?php $handle = fopen("/home/rasmus/file.txt", "r"); @@ -207,33 +202,33 @@ $handle = fopen("ftp://user:password@example.com/somefile.txt", "w"); ?> ]]> - </programlisting> - </example> - </para> - <simpara> - Èç¹ûÔÚÓ÷þÎñÆ÷Ä£¿é°æ±¾µÄ PHP - ʱÔÚ´ò¿ªºÍдÈëÎļþÉÏÓöµ½ÎÊÌ⣬¼ÇסҪȷ±£ËùʹÓõÄÎļþÊÇ·þÎñÆ÷½ø³ÌËùÄܹ»·ÃÎʵġ£ - </simpara> - <para> - ÔÚ Windows ƽ̨ÉÏ£¬ÒªÐ¡ÐÄתÒåÎļþ·¾¶ÖеÄÿ¸ö·´Ð±Ïߣ¬»òÕßÓÃбÏß¡£ - <informalexample> - <programlisting role="php"> + </programlisting> + </example> + </para> + <simpara> + Èç¹ûÔÚÓ÷þÎñÆ÷Ä£¿é°æ±¾µÄ PHP + ʱÔÚ´ò¿ªºÍдÈëÎļþÉÏÓöµ½ÎÊÌ⣬¼ÇסҪȷ±£ËùʹÓõÄÎļþÊÇ·þÎñÆ÷½ø³ÌËùÄܹ»·ÃÎʵġ£ + </simpara> + <para> + ÔÚ Windows ƽ̨ÉÏ£¬ÒªÐ¡ÐÄתÒåÎļþ·¾¶ÖеÄÿ¸ö·´Ð±Ïߣ¬»òÕßÓÃбÏß¡£ + <informalexample> + <programlisting role="php"> <![CDATA[ <?php $handle = fopen("c:\\data\\info.txt", "r"); ?> ]]> - </programlisting> - </informalexample> - </para> - &warn.ssl-non-standard; - ¬e.sm.uidcheck.dir; - <simpara> - ²Î¼û<xref linkend="wrappers"/>£¬<function>fclose</function>£¬<function>fgets</function>£¬<function>fread</function>£¬<function>fwrite</function>£¬<function>fsockopen</function>£¬<function>file</function>£¬<function>file_exists</function>£¬<function>is_readable</function>£¬<function>stream_set_timeout</function> - ºÍ <function>popen</function>¡£ - </simpara> - </refsect1> - </refentry> + </programlisting> + </informalexample> + </para> + &warn.ssl-non-standard; + ¬e.sm.uidcheck.dir; + <simpara> + ²Î¼û<xref linkend="wrappers"/>£¬<function>fclose</function>£¬<function>fgets</function>£¬<function>fread</function>£¬<function>fwrite</function>£¬<function>fsockopen</function>£¬<function>file</function>£¬<function>file_exists</function>£¬<function>is_readable</function>£¬<function>stream_set_timeout</function> + ºÍ <function>popen</function>¡£ + </simpara> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/diff.php/phpdoc-zh/reference/filesystem/functions/fpassthru.xml?r1=1.9&r2=1.10&ty=u Index: phpdoc-zh/reference/filesystem/functions/fpassthru.xml diff -u phpdoc-zh/reference/filesystem/functions/fpassthru.xml:1.9 phpdoc-zh/reference/filesystem/functions/fpassthru.xml:1.10 --- phpdoc-zh/reference/filesystem/functions/fpassthru.xml:1.9 Thu Sep 1 11:41:36 2005 +++ phpdoc-zh/reference/filesystem/functions/fpassthru.xml Tue Sep 13 12:30:43 2005 @@ -1,56 +1,56 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.9 $ --> +<!-- $Revision: 1.10 $ --> <!-- $Author: dallas $ --> <!-- EN-Revision: 1.10 Maintainer: dallas Status: ready --> <!-- CREDITS: lm92 --> - <refentry id="function.fpassthru"> - <refnamediv> - <refname>fpassthru</refname> - <refpurpose>Êä³öÎļþÖ¸Õë´¦µÄËùÓÐÊ£ÓàÊý¾Ý</refpurpose> - </refnamediv> - <refsect1> - <title>˵Ã÷</title> - <methodsynopsis> - <type>int</type><methodname>fpassthru</methodname> - <methodparam><type>resource</type><parameter>handle</parameter></methodparam> - </methodsynopsis> - <simpara> - ½«¸ø¶¨µÄÎļþÖ¸Õë´Óµ±Ç°µÄλÖöÁÈ¡µ½ EOF ²¢°Ñ½á¹ûдµ½Êä³ö»º³åÇø¡£ - </simpara> - <simpara> - Èç¹û·¢Éú´íÎó£¬ <function>fpassthru</function> ·µ»Ø &false;¡£ - ·ñÔò <function>fpassthru</function> ·µ»Ø´Ó <parameter>handle</parameter> - ¶ÁÈ¡²¢´«µÝµ½Êä³öµÄ×Ö·ûÊýÄ¿¡£ - </simpara> - &fs.validfp.all; - <simpara> - Èç¹ûÒѾÏòÎļþдÈëÊý¾Ý£¬¾Í±ØÐëµ÷Óà <function>rewind</function> - À´½«ÎļþÖ¸ÕëÖ¸ÏòÎļþÍ·¡£ - </simpara> - <simpara> - Èç¹û¼È²»ÐÞ¸ÄÎļþÒ²²»ÔÚÌØ¶¨Î»ÖüìË÷£¬Ö»Ï뽫ÎļþµÄÄÚÈÝÏÂÔØµ½Êä³ö»º³åÇø£¬Ó¦¸ÃʹÓà - <function>readfile</function>£¬ÕâÑù¿ÉÒÔʡȥ - <function>fopen</function> µ÷Óᣠ- </simpara> - <note> - <para> - µ±ÔÚ Windows - ϵͳÖн« <function>fpassthru</function> - ÓÃÓÚ¶þ½øÖÆÎļþʱ£¬ÒªÈ·±£ÔÚÓà - <function>fopen</function> - ´ò¿ªÎļþʱÔÚ mode Öи½¼ÓÁË - <literal>b</literal> À´½«ÎļþÒÔ¶þ½øÖÆ·½Ê½´ò¿ª¡£ - </para> - <para> - ¹ÄÀøÔÚ´¦Àí¶þ½øÖÆÎļþʱʹÓà - <literal>b</literal> - ±êÖ¾£¬¼´Ê¹ÏµÍ³²¢²»ÐèÒª£¬ÕâÑù¿ÉÒÔʹ½Å±¾µÄÒÆÖ²ÐÔ¸üºÃ¡£ - </para> - </note> - <para> - <example> - <title>¶Ô¶þ½øÖÆÎļþʹÓà <function>fpassthru</function></title> - <programlisting role="php"> +<refentry id="function.fpassthru"> + <refnamediv> + <refname>fpassthru</refname> + <refpurpose>Êä³öÎļþÖ¸Õë´¦µÄËùÓÐÊ£ÓàÊý¾Ý</refpurpose> + </refnamediv> + <refsect1> + <title>˵Ã÷</title> + <methodsynopsis> + <type>int</type><methodname>fpassthru</methodname> + <methodparam><type>resource</type><parameter>handle</parameter></methodparam> + </methodsynopsis> + <simpara> + ½«¸ø¶¨µÄÎļþÖ¸Õë´Óµ±Ç°µÄλÖöÁÈ¡µ½ EOF ²¢°Ñ½á¹ûдµ½Êä³ö»º³åÇø¡£ + </simpara> + <simpara> + Èç¹û·¢Éú´íÎó£¬ <function>fpassthru</function> ·µ»Ø &false;¡£·ñÔò + <function>fpassthru</function> ·µ»Ø´Ó <parameter>handle</parameter> + ¶ÁÈ¡²¢´«µÝµ½Êä³öµÄ×Ö·ûÊýÄ¿¡£ + </simpara> + &fs.validfp.all; + <simpara> + Èç¹ûÒѾÏòÎļþдÈëÊý¾Ý£¬¾Í±ØÐëµ÷Óà <function>rewind</function> + À´½«ÎļþÖ¸ÕëÖ¸ÏòÎļþÍ·¡£ + </simpara> + <simpara> + Èç¹û¼È²»ÐÞ¸ÄÎļþÒ²²»ÔÚÌØ¶¨Î»ÖüìË÷£¬Ö»Ï뽫ÎļþµÄÄÚÈÝÏÂÔØµ½Êä³ö»º³åÇø£¬Ó¦¸ÃʹÓà + <function>readfile</function>£¬ÕâÑù¿ÉÒÔʡȥ + <function>fopen</function> µ÷Óᣠ+ </simpara> + <note> + <para> + µ±ÔÚ Windows + ϵͳÖн« <function>fpassthru</function> + ÓÃÓÚ¶þ½øÖÆÎļþʱ£¬ÒªÈ·±£ÔÚÓà + <function>fopen</function> + ´ò¿ªÎļþʱÔÚ mode Öи½¼ÓÁË + <literal>b</literal> À´½«ÎļþÒÔ¶þ½øÖÆ·½Ê½´ò¿ª¡£ + </para> + <para> + ¹ÄÀøÔÚ´¦Àí¶þ½øÖÆÎļþʱʹÓà + <literal>b</literal> + ±êÖ¾£¬¼´Ê¹ÏµÍ³²¢²»ÐèÒª£¬ÕâÑù¿ÉÒÔʹ½Å±¾µÄÒÆÖ²ÐÔ¸üºÃ¡£ + </para> + </note> + <para> + <example> + <title>¶Ô¶þ½øÖÆÎļþʹÓà <function>fpassthru</function></title> + <programlisting role="php"> <![CDATA[ <?php @@ -68,16 +68,16 @@ ?> ]]> - </programlisting> - </example> - </para> - <simpara> - ²Î¼û - <function>readfile</function>£¬<function>fopen</function>£¬<function>popen</function> - ºÍ <function>fsockopen</function>¡£ - </simpara> - </refsect1> - </refentry> + </programlisting> + </example> + </para> + <simpara> + ²Î¼û + <function>readfile</function>£¬<function>fopen</function>£¬<function>popen</function> + ºÍ <function>fsockopen</function>¡£ + </simpara> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/diff.php/phpdoc-zh/reference/filesystem/functions/fputs.xml?r1=1.6&r2=1.7&ty=u Index: phpdoc-zh/reference/filesystem/functions/fputs.xml diff -u phpdoc-zh/reference/filesystem/functions/fputs.xml:1.6 phpdoc-zh/reference/filesystem/functions/fputs.xml:1.7 --- phpdoc-zh/reference/filesystem/functions/fputs.xml:1.6 Sun Sep 4 02:03:19 2005 +++ phpdoc-zh/reference/filesystem/functions/fputs.xml Tue Sep 13 12:30:43 2005 @@ -1,11 +1,11 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.6 $ --> +<!-- $Revision: 1.7 $ --> <!-- $Author: dallas $ --> <!-- EN-Revision: 1.6 Maintainer: lm92 Status: ready --> <refentry id="function.fputs"> <refnamediv> <refname>fputs</refname> - <refpurpose><function>fwrite</function>µÄ&Alias;</refpurpose> + <refpurpose><function>fwrite</function> µÄ&Alias;</refpurpose> </refnamediv> <refsect1 role="description"> &reftitle.description; http://cvs.php.net/diff.php/phpdoc-zh/reference/filesystem/functions/fread.xml?r1=1.8&r2=1.9&ty=u Index: phpdoc-zh/reference/filesystem/functions/fread.xml diff -u phpdoc-zh/reference/filesystem/functions/fread.xml:1.8 phpdoc-zh/reference/filesystem/functions/fread.xml:1.9 --- phpdoc-zh/reference/filesystem/functions/fread.xml:1.8 Tue Aug 16 00:31:46 2005 +++ phpdoc-zh/reference/filesystem/functions/fread.xml Tue Sep 13 12:30:43 2005 @@ -1,70 +1,73 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.8 $ --> -<!-- $Author: lm92 $ --> +<!-- $Revision: 1.9 $ --> +<!-- $Author: dallas $ --> <!-- EN-Revision: 1.16 Maintainer: dallas Status: ready --> <!-- CREDITS: lm92 --> - <refentry id="function.fread"> - <refnamediv> - <refname>fread</refname> - <refpurpose>¶ÁÈ¡Îļþ£¨¿É°²È«ÓÃÓÚ¶þ½øÖÆÎļþ£©</refpurpose> - </refnamediv> - <refsect1> - <title>˵Ã÷</title> - <methodsynopsis> - <type>string</type><methodname>fread</methodname> - <methodparam><type>int</type><parameter>handle</parameter></methodparam> - <methodparam><type>int</type><parameter>length</parameter></methodparam> - </methodsynopsis> - <simpara> - <function>fread</function> ´ÓÎļþÖ¸Õë - <parameter>handle</parameter> ¶ÁÈ¡×î¶à - <parameter>length</parameter> ¸ö×Ö½Ú¡£ - ¸Ãº¯ÊýÔÚ¶ÁÈ¡Íê - <parameter>length</parameter> ¸ö×Ö½ÚÊý£¬»òµ½´ï - EOF µÄʱºò£¬»ò£¨¶ÔÓÚÍøÂçÁ÷£©µ±Ò»¸ö°ü¿ÉÓÃʱ¾Í»áÍ£Ö¹¶ÁÈ¡Îļþ£¬ÊÓºõÏÈÅöµ½ÄÄÖÖÇé¿ö¡£ - </simpara> - <para> - <informalexample> - <programlisting role="php"> +<refentry id="function.fread"> + <refnamediv> + <refname>fread</refname> + <refpurpose>¶ÁÈ¡Îļþ£¨¿É°²È«ÓÃÓÚ¶þ½øÖÆÎļþ£©</refpurpose> + </refnamediv> + <refsect1> + <title>˵Ã÷</title> + <methodsynopsis> + <type>string</type><methodname>fread</methodname> + <methodparam><type>int</type><parameter>handle</parameter></methodparam> + <methodparam><type>int</type><parameter>length</parameter></methodparam> + </methodsynopsis> + <simpara> + <function>fread</function> ´ÓÎļþÖ¸Õë + <parameter>handle</parameter> ¶ÁÈ¡×î¶à + <parameter>length</parameter> ¸ö×Ö½Ú¡£¸Ãº¯ÊýÔÚ¶ÁÈ¡Íê + <parameter>length</parameter> ¸ö×Ö½ÚÊý£¬»òµ½´ï + EOF µÄʱºò£¬»ò£¨¶ÔÓÚÍøÂçÁ÷£©µ±Ò»¸ö°ü¿ÉÓÃʱ¾Í»áÍ£Ö¹¶ÁÈ¡Îļþ£¬ÊÓºõÏÈÅöµ½ÄÄÖÖÇé¿ö¡£ + </simpara> + <para> + <informalexample> + <programlisting role="php"> <![CDATA[ +<?php // get contents of a file into a string $filename = "/usr/local/something.txt"; $handle = fopen($filename, "r"); $contents = fread($handle, filesize ($filename)); fclose($handle); +?> ]]> - </programlisting> - </informalexample> - </para> - <warning> - <para> - ÔÚÇø·Ö¶þ½øÖÆÎļþºÍÎı¾ÎļþµÄϵͳÉÏ£¨Èç - Windows£©´ò¿ªÎļþʱ£¬<function>fopen</function> º¯ÊýµÄ mode ²ÎÊýÒª¼ÓÉÏ 'b'¡£ - </para> - </warning> - <para> - <informalexample> - <programlisting role="php"> + </programlisting> + </informalexample> + </para> + <warning> + <para> + ÔÚÇø·Ö¶þ½øÖÆÎļþºÍÎı¾ÎļþµÄϵͳÉÏ£¨Èç + Windows£©´ò¿ªÎļþʱ£¬<function>fopen</function> º¯ÊýµÄ mode ²ÎÊýÒª¼ÓÉÏ 'b'¡£ + </para> + </warning> + <para> + <informalexample> + <programlisting role="php"> <![CDATA[ +<?php $filename = "c:\\files\\somepic.gif"; $handle = fopen($filename, "rb"); $contents = fread($handle, filesize ($filename)); fclose($handle); +?> ]]> - </programlisting> - </informalexample> - </para> - <warning> - <para> - µ±´ÓÍøÂçÁ÷»òÕ߹ܵÀ¶Áȡʱ£¬ÀýÈçÔÚ¶ÁÈ¡´Ó<link - linkend="features.remote-files">Ô¶³ÌÎļþ</link>»ò - <function>popen</function> ÒÔ¼° <function>proc_open</function> - µÄ·µ»ØÊ±£¬¶ÁÈ¡»áÔÚÒ»¸ö°ü¿ÉÓÃÖ®ºóÍ£Ö¹¡£ÕâÒâζ×ÅÄãÓ¦¸ÃÈçÏÂÀýËùʾ½«Êý¾ÝÊÕ¼¯ÆðÀ´ºÏ²¢³É´ó¿é¡£ - </para> - </warning> - <para> - <informalexample> - <programlisting role="php"> + </programlisting> + </informalexample> + </para> + <warning> + <para> + µ±´ÓÍøÂçÁ÷»òÕ߹ܵÀ¶Áȡʱ£¬ÀýÈçÔÚ¶ÁÈ¡´Ó<link + linkend="features.remote-files">Ô¶³ÌÎļþ</link>»ò + <function>popen</function> ÒÔ¼° <function>proc_open</function> + µÄ·µ»ØÊ±£¬¶ÁÈ¡»áÔÚÒ»¸ö°ü¿ÉÓÃÖ®ºóÍ£Ö¹¡£ÕâÒâζ×ÅÓ¦¸ÃÈçÏÂÀýËùʾ½«Êý¾ÝÊÕ¼¯ÆðÀ´ºÏ²¢³É´ó¿é¡£ + </para> + </warning> + <para> + <informalexample> + <programlisting role="php"> <![CDATA[ <?php $handle = fopen ("http://www.example.com/", "rb"); @@ -75,22 +78,22 @@ fclose($handle); ?> ]]> - </programlisting> - </informalexample> - </para> - <note> - <para> - Èç¹ûÄãÖ»ÊÇÏ뽫һ¸öÎļþµÄÄÚÈݶÁÈëµ½Ò»¸ö×Ö·û´®ÖУ¬Óà - <function>file_get_contents</function>£¬ËüµÄÐÔÄܱÈÉÏÃæµÄ´úÂëºÃµÃ¶à¡£ - </para> - </note> - <simpara> - ²Î¼û - <function>fwrite</function>£¬<function>fopen</function>£¬<function>fsockopen</function>£¬<function>popen</function>£¬<function>fgets</function>£¬<function>fgetss</function>£¬<function>fscanf</function>£¬<function>file</function> - ºÍ <function>fpassthru</function>¡£ - </simpara> - </refsect1> - </refentry> + </programlisting> + </informalexample> + </para> + <note> + <para> + Èç¹ûÖ»ÊÇÏ뽫һ¸öÎļþµÄÄÚÈݶÁÈëµ½Ò»¸ö×Ö·û´®ÖУ¬Óà + <function>file_get_contents</function>£¬ËüµÄÐÔÄܱÈÉÏÃæµÄ´úÂëºÃµÃ¶à¡£ + </para> + </note> + <simpara> + ²Î¼û + <function>fwrite</function>£¬<function>fopen</function>£¬<function>fsockopen</function>£¬<function>popen</function>£¬<function>fgets</function>£¬<function>fgetss</function>£¬<function>fscanf</function>£¬<function>file</function> + ºÍ <function>fpassthru</function>¡£ + </simpara> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/diff.php/phpdoc-zh/reference/filesystem/functions/fseek.xml?r1=1.5&r2=1.6&ty=u Index: phpdoc-zh/reference/filesystem/functions/fseek.xml diff -u phpdoc-zh/reference/filesystem/functions/fseek.xml:1.5 phpdoc-zh/reference/filesystem/functions/fseek.xml:1.6 --- phpdoc-zh/reference/filesystem/functions/fseek.xml:1.5 Mon Aug 15 23:17:33 2005 +++ phpdoc-zh/reference/filesystem/functions/fseek.xml Tue Sep 13 12:30:43 2005 @@ -1,48 +1,48 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.5 $ --> -<!-- $Author: lm92 $ --> +<!-- $Revision: 1.6 $ --> +<!-- $Author: dallas $ --> <!-- EN-Revision: 1.10 Maintainer: dallas Status: ready --> - <refentry id="function.fseek"> - <refnamediv> - <refname>fseek</refname> - <refpurpose>ÔÚÎļþÖ¸ÕëÖж¨Î»</refpurpose> - </refnamediv> - <refsect1> - <title>˵Ã÷</title> - <methodsynopsis> - <type>int</type><methodname>fseek</methodname> - <methodparam><type>resource</type><parameter>handle</parameter></methodparam> - <methodparam><type>int</type><parameter>offset</parameter></methodparam> - <methodparam choice="opt"><type>int</type><parameter>whence</parameter></methodparam> - </methodsynopsis> - <para> - ÔÚÓë - <parameter>handle</parameter> - ¹ØÁªµÄÎļþÖÐÉ趨ÎļþÖ¸ÕëλÖá£ÐÂλÖ㬴ÓÎļþÍ·¿ªÊ¼ÒÔ×Ö½ÚÊý¶ÈÁ¿£¬ÊÇÒÔ - <parameter>whence</parameter> - Ö¸¶¨µÄλÖüÓÉÏ - <parameter>offset</parameter>¡£<parameter>whence</parameter> - µÄÖµ¶¨ÒåΪ£º - <simplelist> - <member><constant>SEEK_SET</constant> - É趨λÖõÈÓÚ <parameter>offset</parameter> ×Ö½Ú¡£</member> - <member><constant>SEEK_CUR</constant> - É趨λÖÃΪµ±Ç°Î»ÖüÓÉÏ <parameter>offset</parameter>¡£</member> - <member><constant>SEEK_END</constant> - É趨λÖÃΪÎļþβ¼ÓÉÏ - <parameter>offset</parameter>¡££¨ÒªÒƶ¯µ½Îļþβ֮ǰµÄλÖã¬ÐèÒª¸ø - <parameter>offset</parameter> ´«µÝÒ»¸ö¸ºÖµ¡££©</member> - </simplelist> - </para> - <para> - Èç¹ûûÓÐÖ¸¶¨ - <parameter>whence</parameter>£¬Ä¬ÈÏΪ - <constant>SEEK_SET</constant>¡£ - </para> - <para> - ³É¹¦Ôò·µ»Ø 0£»·ñÔò·µ»Ø -1¡£×¢ÒâÒÆ¶¯µ½ EOF Ö®ºóµÄλÖò»Ëã´íÎó¡£ - </para> - <para> - <example> - <title><function>fseek</function> Àý×Ó</title> - <programlisting role="php"> +<refentry id="function.fseek"> + <refnamediv> + <refname>fseek</refname> + <refpurpose>ÔÚÎļþÖ¸ÕëÖж¨Î»</refpurpose> + </refnamediv> + <refsect1> + <title>˵Ã÷</title> + <methodsynopsis> + <type>int</type><methodname>fseek</methodname> + <methodparam><type>resource</type><parameter>handle</parameter></methodparam> + <methodparam><type>int</type><parameter>offset</parameter></methodparam> + <methodparam choice="opt"><type>int</type><parameter>whence</parameter></methodparam> + </methodsynopsis> + <para> + ÔÚÓë + <parameter>handle</parameter> + ¹ØÁªµÄÎļþÖÐÉ趨ÎļþÖ¸ÕëλÖá£ÐÂλÖôÓÎļþÍ·¿ªÊ¼ÒÔ×Ö½ÚÊý¶ÈÁ¿£¬ÊÇÒÔ + <parameter>whence</parameter> + Ö¸¶¨µÄλÖüÓÉÏ + <parameter>offset</parameter>¡£<parameter>whence</parameter> + µÄÖµ¶¨ÒåΪ£º + <simplelist> + <member><constant>SEEK_SET</constant> - É趨λÖõÈÓÚ <parameter>offset</parameter> ×Ö½Ú¡£</member> + <member><constant>SEEK_CUR</constant> - É趨λÖÃΪµ±Ç°Î»ÖüÓÉÏ <parameter>offset</parameter>¡£</member> + <member><constant>SEEK_END</constant> - É趨λÖÃΪÎļþβ¼ÓÉÏ + <parameter>offset</parameter>¡££¨ÒªÒƶ¯µ½Îļþβ֮ǰµÄλÖã¬ÐèÒª¸ø + <parameter>offset</parameter> ´«µÝÒ»¸ö¸ºÖµ¡££©</member> + </simplelist> + </para> + <para> + Èç¹ûûÓÐÖ¸¶¨ + <parameter>whence</parameter>£¬Ä¬ÈÏΪ + <constant>SEEK_SET</constant>¡£ + </para> + <para> + ³É¹¦Ôò·µ»Ø 0£»·ñÔò·µ»Ø -1¡£×¢ÒâÒÆ¶¯µ½ EOF Ö®ºóµÄλÖò»Ëã´íÎó¡£ + </para> + <para> + <example> + <title><function>fseek</function> Àý×Ó</title> + <programlisting role="php"> <![CDATA[ <?php @@ -57,31 +57,31 @@ ?> ]]> - </programlisting> - </example> - </para> - <para> - ¿ÉÄܲ»ÄÜÓÃÓÚÔÚ - <function>fopen</function> - ÖÐÒÔ "http://" »ò "ftp://" ¸ñʽ´ò¿ªËù·µ»ØµÄÎļþÖ¸Õë¡£ÔÚ¸½¼Óģʽ£¨¼Ó²ÎÊý "a" ´ò¿ªÎļþ£©ÖÐ - <function>ftell</function> »á·µ»ØÎ´¶¨Òå´íÎó¡£ - </para> - <note> - <para> - <parameter>whence</parameter> ²ÎÊýÊÇ PHP 4.0.0 Ö®ºóÔö¼ÓµÄ¡£ - </para> - </note> - <note> - <para> - Èç¹ûÄãʹÓø½¼ÓÄ£ÊÔ£¨"a" »ò "a+"£©£¬ÈκÎдÈëÎļþÊý¾Ý¶¼»á±»¸½¼ÓÉÏÈ¥£¬¶øÎļþµÄλÖý«»á±»ºöÂÔ¡£ - </para> - </note> - <para> - ²Î¼û <function>ftell</function> ºÍ - <function>rewind</function>¡£ - </para> - </refsect1> - </refentry> + </programlisting> + </example> + </para> + <para> + ¿ÉÄܲ»ÄÜÓÃÓÚÔÚ + <function>fopen</function> + ÖÐÒÔ "http://" »ò "ftp://" ¸ñʽ´ò¿ªËù·µ»ØµÄÎļþÖ¸Õë¡£ÔÚ¸½¼Óģʽ£¨¼Ó²ÎÊý "a" ´ò¿ªÎļþ£©ÖÐ + <function>ftell</function> »á·µ»ØÎ´¶¨Òå´íÎó¡£ + </para> + <note> + <para> + <parameter>whence</parameter> ²ÎÊýÊÇ PHP 4.0.0 Ö®ºóÔö¼ÓµÄ¡£ + </para> + </note> + <note> + <para> + Èç¹ûʹÓø½¼ÓÄ£ÊÔ£¨"a" »ò "a+"£©£¬ÈκÎдÈëÎļþÊý¾Ý¶¼»á±»¸½¼ÓÉÏÈ¥£¬¶øÎļþµÄλÖý«»á±»ºöÂÔ¡£ + </para> + </note> + <para> + ²Î¼û <function>ftell</function> ºÍ + <function>rewind</function>¡£ + </para> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/diff.php/phpdoc-zh/reference/filesystem/functions/fstat.xml?r1=1.5&r2=1.6&ty=u Index: phpdoc-zh/reference/filesystem/functions/fstat.xml diff -u phpdoc-zh/reference/filesystem/functions/fstat.xml:1.5 phpdoc-zh/reference/filesystem/functions/fstat.xml:1.6 --- phpdoc-zh/reference/filesystem/functions/fstat.xml:1.5 Mon Aug 15 23:04:34 2005 +++ phpdoc-zh/reference/filesystem/functions/fstat.xml Tue Sep 13 12:30:43 2005 @@ -1,31 +1,31 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.5 $ --> -<!-- $Author: lm92 $ --> +<!-- $Revision: 1.6 $ --> +<!-- $Author: dallas $ --> <!-- EN-Revision: 1.10 Maintainer: dallas Status: ready --> - <refentry id="function.fstat"> - <refnamediv> - <refname>fstat</refname> - <refpurpose>ͨ¹ýÒÑ´ò¿ªµÄÎļþÖ¸ÕëÈ¡µÃÎļþÐÅÏ¢</refpurpose> - </refnamediv> - <refsect1> - <title>˵Ã÷</title> - <methodsynopsis> - <type>array</type><methodname>fstat</methodname> - <methodparam><type>resource</type><parameter>handle</parameter></methodparam> - </methodsynopsis> - <para> - »ñÈ¡ÓÉÎļþÖ¸Õë <parameter>handle</parameter> - Ëù´ò¿ªÎļþµÄͳ¼ÆÐÅÏ¢¡£±¾º¯ÊýºÍ <function>stat</function> - º¯ÊýÏàËÆ£¬³ýÁËËüÊÇ×÷ÓÃÓÚÒÑ´ò¿ªµÄÎļþÖ¸Õë¶ø²»ÊÇÎļþÃû¡£ - </para> - <para> - ·µ»ØÒ»¸öÊý×é¾ßÓиÃÎļþµÄͳ¼ÆÐÅÏ¢£¬¸ÃÊý×éµÄ¸ñʽÏêϸ˵Ã÷ÓÚÊÖ²áÖÐ - <function>stat</function> Ò³ÃæÀï¡£ - </para> - <para> - <example> - <title><function>fstat</function> Àý×Ó</title> - <programlisting role="php"> +<refentry id="function.fstat"> + <refnamediv> + <refname>fstat</refname> + <refpurpose>ͨ¹ýÒÑ´ò¿ªµÄÎļþÖ¸ÕëÈ¡µÃÎļþÐÅÏ¢</refpurpose> + </refnamediv> + <refsect1> + <title>˵Ã÷</title> + <methodsynopsis> + <type>array</type><methodname>fstat</methodname> + <methodparam><type>resource</type><parameter>handle</parameter></methodparam> + </methodsynopsis> + <para> + »ñÈ¡ÓÉÎļþÖ¸Õë <parameter>handle</parameter> + Ëù´ò¿ªÎļþµÄͳ¼ÆÐÅÏ¢¡£±¾º¯ÊýºÍ <function>stat</function> + º¯ÊýÏàËÆ£¬³ýÁËËüÊÇ×÷ÓÃÓÚÒÑ´ò¿ªµÄÎļþÖ¸Õë¶ø²»ÊÇÎļþÃû¡£ + </para> + <para> + ·µ»ØÒ»¸öÊý×é¾ßÓиÃÎļþµÄͳ¼ÆÐÅÏ¢£¬¸ÃÊý×éµÄ¸ñʽÏêϸ˵Ã÷ÓÚÊÖ²áÖÐ + <function>stat</function> Ò³ÃæÀï¡£ + </para> + <para> + <example> + <title><function>fstat</function> Àý×Ó</title> + <programlisting role="php"> <![CDATA[ <?php @@ -43,9 +43,9 @@ ?> ]]> - </programlisting> - &example.outputs.similar; - <screen> + </programlisting> + &example.outputs.similar; + <screen> <![CDATA[ Array ( @@ -64,12 +64,12 @@ [blocks] => 8 ) ]]> - </screen> - </example> - </para> - ¬e.no-remote; - </refsect1> - </refentry> + </screen> + </example> + </para> + ¬e.no-remote; + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables:
http://cvs.php.net/diff.php/phpdoc-zh/reference/filesystem/functions/fgetc.xml?r1=1.6&r2=1.7&ty=u Index: phpdoc-zh/reference/filesystem/functions/fgetc.xml diff -u phpdoc-zh/reference/filesystem/functions/fgetc.xml:1.6 phpdoc-zh/reference/filesystem/functions/fgetc.xml:1.7 --- phpdoc-zh/reference/filesystem/functions/fgetc.xml:1.6 Fri Jul 15 13:17:27 2005 +++ phpdoc-zh/reference/filesystem/functions/fgetc.xml Tue Sep 13 12:30:43 2005 @@ -1,29 +1,28 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.6 $ --> -<!-- $Author: yincheng $ --> +<!-- $Revision: 1.7 $ --> +<!-- $Author: dallas $ --> <!-- EN-Revision: 1.10 Maintainer: dallas Status: ready --> - <refentry id="function.fgetc"> - <refnamediv> - <refname>fgetc</refname> - <refpurpose>´ÓÎļþÖ¸ÕëÖжÁÈ¡×Ö·û</refpurpose> - </refnamediv> - <refsect1> - <title>˵Ã÷</title> - <methodsynopsis> - <type>string</type><methodname>fgetc</methodname> - <methodparam><type>resource</type><parameter>handle</parameter></methodparam> - </methodsynopsis> - <para> - ·µ»ØÒ»¸ö°üº¬ÓÐÒ»¸ö×Ö·ûµÄ×Ö·û´®£¬¸Ã×Ö·û´Ó <parameter>handle</parameter> - Ö¸ÏòµÄÎļþÖеõ½¡£Åöµ½ EOF Ôò·µ»Ø &false;¡£ - </para> - - &fs.validfp.all; - &return.falseproblem; - <para> - <example> - <title><function>fgetc</function> Àý×Ó</title> - <programlisting role="php"> +<refentry id="function.fgetc"> + <refnamediv> + <refname>fgetc</refname> + <refpurpose>´ÓÎļþÖ¸ÕëÖжÁÈ¡×Ö·û</refpurpose> + </refnamediv> + <refsect1> + <title>˵Ã÷</title> + <methodsynopsis> + <type>string</type><methodname>fgetc</methodname> + <methodparam><type>resource</type><parameter>handle</parameter></methodparam> + </methodsynopsis> + <para> + ·µ»ØÒ»¸ö°üº¬ÓÐÒ»¸ö×Ö·ûµÄ×Ö·û´®£¬¸Ã×Ö·û´Ó <parameter>handle</parameter> + Ö¸ÏòµÄÎļþÖеõ½¡£Åöµ½ EOF Ôò·µ»Ø &false;¡£ + </para> + &fs.validfp.all; + &return.falseproblem; + <para> + <example> + <title><function>fgetc</function> Àý×Ó</title> + <programlisting role="php"> <![CDATA[ <?php $fp = fopen('somefile.txt', 'r'); @@ -35,16 +34,16 @@ } ?> ]]> - </programlisting> - </example> - </para> - ¬e.bin-safe; - <para> - ²Î¼û <function>fread</function>£¬<function>fopen</function>£¬<function>popen</function>£¬<function>fsockopen</function> - ºÍ <function>fgets</function>¡£ - </para> - </refsect1> - </refentry> + </programlisting> + </example> + </para> + ¬e.bin-safe; + <para> + ²Î¼û <function>fread</function>£¬<function>fopen</function>£¬<function>popen</function>£¬<function>fsockopen</function> + ºÍ <function>fgets</function>¡£ + </para> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/diff.php/phpdoc-zh/reference/filesystem/functions/fgetcsv.xml?r1=1.5&r2=1.6&ty=u Index: phpdoc-zh/reference/filesystem/functions/fgetcsv.xml diff -u phpdoc-zh/reference/filesystem/functions/fgetcsv.xml:1.5 phpdoc-zh/reference/filesystem/functions/fgetcsv.xml:1.6 --- phpdoc-zh/reference/filesystem/functions/fgetcsv.xml:1.5 Tue Aug 16 09:28:40 2005 +++ phpdoc-zh/reference/filesystem/functions/fgetcsv.xml Tue Sep 13 12:30:43 2005 @@ -1,79 +1,77 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.5 $ --> -<!-- $Author: lm92 $ --> +<!-- $Revision: 1.6 $ --> +<!-- $Author: dallas $ --> <!-- EN-Revision: 1.20 Maintainer: dallas Status: ready --> - <refentry id="function.fgetcsv"> - <refnamediv> - <refname>fgetcsv</refname> - <refpurpose>´ÓÎļþÖ¸ÕëÖжÁÈëÒ»Ðв¢½âÎö CSV ×Ö¶Î</refpurpose> - </refnamediv> - <refsect1> - <title>˵Ã÷</title> - <methodsynopsis> - <type>array</type><methodname>fgetcsv</methodname> - <methodparam><type>int</type><parameter>handle</parameter></methodparam> - <methodparam choice="opt"><type>int</type><parameter>length</parameter></methodparam> - <methodparam choice="opt"><type>string</type><parameter>delimiter</parameter></methodparam> - <methodparam choice="opt"><type>string</type><parameter>enclosure</parameter></methodparam> - </methodsynopsis> - - <para> - <variablelist> - <varlistentry> - <term><parameter>handle</parameter></term> - <listitem> - <simpara> - Ò»¸öÓÉ <function>fopen</function>¡¢<function>popen</function> »ò - <function>fsockopen</function> ²úÉúµÄÓÐЧÎļþÖ¸Õë¡£ - </simpara> - </listitem> - </varlistentry> - <varlistentry> - <term><parameter>length</parameter> £¨¿ÉÑ¡£©</term> - <listitem> - <simpara> - ±ØÐë´óÓÚ CVS ÎļþÄÚ×µÄÒ»ÐС£ÔÚ PHP 5 - ÖиòÎÊýÊÇ¿ÉÑ¡µÄ¡£Èç¹ûºöÂÔ£¨ÔÚ PHP 5.0.4 ÒÔºóµÄ°æ±¾ÖÐÉèΪ - 0£©¸Ã²ÎÊýµÄ»°£¬ÄÇô³¤¶È¾ÍûÓÐÏÞÖÆ£¬²»¹ý¿ÉÄÜ»áÓ°ÏìÖ´ÐÐЧÂÊ¡£ - </simpara> - </listitem> - </varlistentry> - <varlistentry> - <term><parameter>delimiter</parameter> £¨¿ÉÑ¡£©</term> - <listitem> - <simpara> - ÉèÖÃ×ֶηֽç·û£¨Ö»ÔÊÐíÒ»¸ö×Ö·û£©£¬Ä¬ÈÏֵΪ¶ººÅ¡£ - </simpara> - </listitem> - </varlistentry> - <varlistentry> - <term><parameter>enclosure</parameter> £¨¿ÉÑ¡£©</term> - <listitem> - <simpara> - ÉèÖÃ×ֶλ·ÈÆ·û£¨Ö»ÔÊÐíÒ»¸ö×Ö·û£©£¬Ä¬ÈÏֵΪ˫ÒýºÅ¡£¸Ã²ÎÊýÊÇÔÚ PHP 4.3.0 ÖÐÌí¼ÓµÄ¡£ - </simpara> - </listitem> - </varlistentry> - </variablelist> - </para> - - <simpara> - ºÍ <function>fgets</function> ÀàËÆ£¬Ö»³ýÁË - <function>fgetcsv</function> ½âÎö¶ÁÈëµÄÐв¢ÕÒ³ö <acronym>CSV</acronym> - ¸ñʽµÄ×Ö¶ÎÈ»ºó·µ»ØÒ»¸ö°üº¬ÕâЩ×ֶεÄÊý×é¡£ - </simpara> - <simpara> - <function>fgetcsv</function> ³ö´íʱ·µ»Ø &false;£¬°üÀ¨Åöµ½Îļþ½áÊøÊ±¡£ - </simpara> - <note> - <simpara> - CSV ÎļþÖеĿÕÐн«±»·µ»ØÎªÒ»¸ö°üº¬Óе¥¸ö <type>null</type> ×ֶεÄÊý×飬²»»á±»µ±³É´íÎó¡£ - </simpara> - </note> - <para> - <example> - <title>¶ÁÈ¡²¢ÏÔʾ CSV ÎļþµÄÕû¸öÄÚÈÝ</title> - <programlisting role="php"> +<refentry id="function.fgetcsv"> + <refnamediv> + <refname>fgetcsv</refname> + <refpurpose>´ÓÎļþÖ¸ÕëÖжÁÈëÒ»Ðв¢½âÎö CSV ×Ö¶Î</refpurpose> + </refnamediv> + <refsect1> + <title>˵Ã÷</title> + <methodsynopsis> + <type>array</type><methodname>fgetcsv</methodname> + <methodparam><type>int</type><parameter>handle</parameter></methodparam> + <methodparam choice="opt"><type>int</type><parameter>length</parameter></methodparam> + <methodparam choice="opt"><type>string</type><parameter>delimiter</parameter></methodparam> + <methodparam choice="opt"><type>string</type><parameter>enclosure</parameter></methodparam> + </methodsynopsis> + <para> + <variablelist> + <varlistentry> + <term><parameter>handle</parameter></term> + <listitem> + <simpara> + Ò»¸öÓÉ <function>fopen</function>¡¢<function>popen</function> »ò + <function>fsockopen</function> ²úÉúµÄÓÐЧÎļþÖ¸Õë¡£ + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>length</parameter> £¨¿ÉÑ¡£©</term> + <listitem> + <simpara> + ±ØÐë´óÓÚ CVS ÎļþÄÚ×µÄÒ»ÐС£ÔÚ PHP 5 + ÖиòÎÊýÊÇ¿ÉÑ¡µÄ¡£Èç¹ûºöÂÔ£¨ÔÚ PHP 5.0.4 ÒÔºóµÄ°æ±¾ÖÐÉèΪ + 0£©¸Ã²ÎÊýµÄ»°£¬ÄÇô³¤¶È¾ÍûÓÐÏÞÖÆ£¬²»¹ý¿ÉÄÜ»áÓ°ÏìÖ´ÐÐЧÂÊ¡£ + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>delimiter</parameter> £¨¿ÉÑ¡£©</term> + <listitem> + <simpara> + ÉèÖÃ×ֶηֽç·û£¨Ö»ÔÊÐíÒ»¸ö×Ö·û£©£¬Ä¬ÈÏֵΪ¶ººÅ¡£ + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>enclosure</parameter> £¨¿ÉÑ¡£©</term> + <listitem> + <simpara> + ÉèÖÃ×ֶλ·ÈÆ·û£¨Ö»ÔÊÐíÒ»¸ö×Ö·û£©£¬Ä¬ÈÏֵΪ˫ÒýºÅ¡£¸Ã²ÎÊýÊÇÔÚ PHP 4.3.0 ÖÐÌí¼ÓµÄ¡£ + </simpara> + </listitem> + </varlistentry> + </variablelist> + </para> + <simpara> + ºÍ <function>fgets</function> ÀàËÆ£¬Ö»³ýÁË + <function>fgetcsv</function> ½âÎö¶ÁÈëµÄÐв¢ÕÒ³ö <acronym>CSV</acronym> + ¸ñʽµÄ×Ö¶ÎÈ»ºó·µ»ØÒ»¸ö°üº¬ÕâЩ×ֶεÄÊý×é¡£ + </simpara> + <simpara> + <function>fgetcsv</function> ³ö´íʱ·µ»Ø &false;£¬°üÀ¨Åöµ½Îļþ½áÊøÊ±¡£ + </simpara> + <note> + <simpara> + CSV ÎļþÖеĿÕÐн«±»·µ»ØÎªÒ»¸ö°üº¬Óе¥¸ö <type>null</type> ×ֶεÄÊý×飬²»»á±»µ±³É´íÎó¡£ + </simpara> + </note> + <para> + <example> + <title>¶ÁÈ¡²¢ÏÔʾ CSV ÎļþµÄÕû¸öÄÚÈÝ</title> + <programlisting role="php"> <![CDATA[ <?php $row = 1; @@ -89,25 +87,25 @@ fclose($handle); ?> ]]> - </programlisting> - </example> - </para> - <para> - ´Ó PHP 4.3.5 Æð£¬<function>fgetcsv</function> µÄ²Ù×÷ÊǶþ½øÖư²È«µÄ¡£ - </para> - <note> - <simpara> - ¸Ãº¯Êý¶ÔÇøÓòÉèÖÃÊÇÃô¸ÐµÄ¡£±ÈÈç˵ <varname>LANG</varname> ÉèΪ - <literal>en_US.UTF-8</literal> µÄ»°£¬µ¥×Ö½Ú±àÂëµÄÎļþ¾Í»á³öÏÖ¶ÁÈ¡´íÎó¡£ - </simpara> - </note> - ¬e.line-endings; - <para> - ²Î¼û <function>explode</function>£¬<function>file</function>£¬<function>pack</function> - ºÍ <function>fputcsv</function> - </para> - </refsect1> - </refentry> + </programlisting> + </example> + </para> + <para> + ´Ó PHP 4.3.5 Æð£¬<function>fgetcsv</function> µÄ²Ù×÷ÊǶþ½øÖư²È«µÄ¡£ + </para> + <note> + <simpara> + ¸Ãº¯Êý¶ÔÇøÓòÉèÖÃÊÇÃô¸ÐµÄ¡£±ÈÈç˵ <varname>LANG</varname> ÉèΪ + <literal>en_US.UTF-8</literal> µÄ»°£¬µ¥×Ö½Ú±àÂëµÄÎļþ¾Í»á³öÏÖ¶ÁÈ¡´íÎó¡£ + </simpara> + </note> + ¬e.line-endings; + <para> + ²Î¼û <function>explode</function>£¬<function>file</function>£¬<function>pack</function> + ºÍ <function>fputcsv</function> + </para> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/diff.php/phpdoc-zh/reference/filesystem/functions/fileperms.xml?r1=1.4&r2=1.5&ty=u Index: phpdoc-zh/reference/filesystem/functions/fileperms.xml diff -u phpdoc-zh/reference/filesystem/functions/fileperms.xml:1.4 phpdoc-zh/reference/filesystem/functions/fileperms.xml:1.5 --- phpdoc-zh/reference/filesystem/functions/fileperms.xml:1.4 Tue Aug 16 00:40:45 2005 +++ phpdoc-zh/reference/filesystem/functions/fileperms.xml Tue Sep 13 12:30:43 2005 @@ -1,48 +1,48 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.4 $ --> -<!-- $Author: lm92 $ --> +<!-- $Revision: 1.5 $ --> +<!-- $Author: dallas $ --> <!-- EN-Revision: 1.9 Maintainer: dallas Status: ready --> - <refentry id="function.fileperms"> - <refnamediv> - <refname>fileperms</refname> - <refpurpose>È¡µÃÎļþµÄȨÏÞ</refpurpose> - </refnamediv> - <refsect1> - <title>˵Ã÷</title> - <methodsynopsis> - <type>int</type><methodname>fileperms</methodname> - <methodparam><type>string</type><parameter>filename</parameter></methodparam> - </methodsynopsis> - <para> - ·µ»ØÎļþµÄ·ÃÎÊȨÏÞ£¬Èç¹û³ö´íÔò·µ»Ø &false;¡£ - </para> - ¬e.clearstatcache; - &tip.fopen-wrapper.stat; - <example> - <title>Ò԰˽øÖƵÄÐÎʽÏÔʾÎļþµÄȨÏÞ</title> - <programlisting role="php"> +<refentry id="function.fileperms"> + <refnamediv> + <refname>fileperms</refname> + <refpurpose>È¡µÃÎļþµÄȨÏÞ</refpurpose> + </refnamediv> + <refsect1> + <title>˵Ã÷</title> + <methodsynopsis> + <type>int</type><methodname>fileperms</methodname> + <methodparam><type>string</type><parameter>filename</parameter></methodparam> + </methodsynopsis> + <para> + ·µ»ØÎļþµÄ·ÃÎÊȨÏÞ£¬Èç¹û³ö´íÔò·µ»Ø &false;¡£ + </para> + ¬e.clearstatcache; + &tip.fopen-wrapper.stat; + <example> + <title>Ò԰˽øÖƵÄÐÎʽÏÔʾÎļþµÄȨÏÞ</title> + <programlisting role="php"> <![CDATA[ <?php echo substr(sprintf('%o', fileperms('/tmp')), -4); echo substr(sprintf('%o', fileperms('/etc/passwd')), -4); ?> ]]> - </programlisting> - <para>ÉÏÀý½«Êä³ö£º</para> - <screen> + </programlisting> + &example.outputs.similar; + <screen> <![CDATA[ 1777 0644 ]]> - </screen> - </example> - <example> - <title>Êä³öÈ«²¿È¨ÏÞ</title> - <programlisting role="php"> + </screen> + </example> + <example> + <title>Êä³öÈ«²¿È¨ÏÞ</title> + <programlisting role="php"> <![CDATA[ <?php $perms = fileperms('/etc/passwd'); - + if (($perms & 0xC000) == 0xC000) { // Socket $info = 's'; @@ -68,44 +68,44 @@ // Unknown $info = 'u'; } - + // Owner $info .= (($perms & 0x0100) ? 'r' : '-'); $info .= (($perms & 0x0080) ? 'w' : '-'); $info .= (($perms & 0x0040) ? (($perms & 0x0800) ? 's' : 'x' ) : (($perms & 0x0800) ? 'S' : '-')); - + // Group $info .= (($perms & 0x0020) ? 'r' : '-'); $info .= (($perms & 0x0010) ? 'w' : '-'); $info .= (($perms & 0x0008) ? (($perms & 0x0400) ? 's' : 'x' ) : (($perms & 0x0400) ? 'S' : '-')); - + // World $info .= (($perms & 0x0004) ? 'r' : '-'); $info .= (($perms & 0x0002) ? 'w' : '-'); $info .= (($perms & 0x0001) ? (($perms & 0x0200) ? 't' : 'x' ) : (($perms & 0x0200) ? 'T' : '-')); - + echo $info; ?> ]]> - </programlisting> - <para>ÉÏÀý½«Êä³ö£º</para> - <screen> + </programlisting> + &example.outputs.similar; + <screen> <![CDATA[ -r--r--r-- ]]> - </screen> - </example> - <simpara> - ²Î¼û <function>is_readable</function> ºÍ <function>stat</function>¡£ - </simpara> - </refsect1> - </refentry> + </screen> + </example> + <simpara> + ²Î¼û <function>is_readable</function> ºÍ <function>stat</function>¡£ + </simpara> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/diff.php/phpdoc-zh/reference/filesystem/functions/filesize.xml?r1=1.5&r2=1.6&ty=u Index: phpdoc-zh/reference/filesystem/functions/filesize.xml diff -u phpdoc-zh/reference/filesystem/functions/filesize.xml:1.5 phpdoc-zh/reference/filesystem/functions/filesize.xml:1.6 --- phpdoc-zh/reference/filesystem/functions/filesize.xml:1.5 Tue Aug 16 00:35:44 2005 +++ phpdoc-zh/reference/filesystem/functions/filesize.xml Tue Sep 13 12:30:43 2005 @@ -1,36 +1,37 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.5 $ --> -<!-- $Author: lm92 $ --> +<!-- $Revision: 1.6 $ --> +<!-- $Author: dallas $ --> <!-- EN-Revision: 1.7 Maintainer: dallas Status: ready --> - <refentry id="function.filesize"> - <refnamediv> - <refname>filesize</refname> - <refpurpose>È¡µÃÎļþ´óС</refpurpose> - </refnamediv> - <refsect1> - <title>˵Ã÷</title> - <methodsynopsis> - <type>int</type><methodname>filesize</methodname> - <methodparam><type>string</type><parameter>filename</parameter></methodparam> - </methodsynopsis> - <para> - ·µ»ØÎļþ´óСµÄ×Ö½ÚÊý£¬Èç¹û³ö´í·µ»Ø &false; £¨ÔÚ´íÎ󱨸漶±ðΪ <constant>E_WARNING</constant>µÄÇé¿öÏ£©¡£ - </para> - <note> - <simpara> - ÒòΪ PHP µÄÕûÊýÀàÐÍÊÇÓзûºÅµÄ£¬²¢ÇÒ´ó¶àÊýƽ̨ʹÓà 32 - λÕûÊý£¬<function>filesize</function> º¯ÊýÔÚÅöµ½´óÓÚ 2GB - µÄÎļþʱ¿ÉÄܻ᷵»Ø·ÇÔ¤ÆÚµÄ½á¹û¡£¶ÔÓÚ 2GB µ½ 4GB - Ö®¼äµÄÎļþͨ³£¿ÉÒÔʹÓà - <literal>sprintf("%u", filesize($file))</literal> À´¿Ë·þ´ËÎÊÌâ¡£ - </simpara> - </note> - ¬e.clearstatcache; - &tip.fopen-wrapper.stat; - <para> - <example> - <title><function>filesize</function> Àý×Ó</title> - <programlisting role="php"> +<refentry id="function.filesize"> + <refnamediv> + <refname>filesize</refname> + <refpurpose>È¡µÃÎļþ´óС</refpurpose> + </refnamediv> + <refsect1> + <title>˵Ã÷</title> + <methodsynopsis> + <type>int</type><methodname>filesize</methodname> + <methodparam><type>string</type><parameter>filename</parameter></methodparam> + </methodsynopsis> + <para> + ·µ»ØÎļþ´óСµÄ×Ö½ÚÊý£¬Èç¹û³ö´í·µ»Ø &false; ²¢Éú³ÉÒ»Ìõ + <constant>E_WARNING</constant> ¼¶µÄ´íÎó¡£ + </para> + <note> + <simpara> + ÒòΪ PHP µÄÕûÊýÀàÐÍÊÇÓзûºÅµÄ£¬²¢ÇÒ´ó¶àÊýƽ̨ʹÓà 32 + λÕûÊý£¬<function>filesize</function> º¯ÊýÔÚÅöµ½´óÓÚ 2GB + µÄÎļþʱ¿ÉÄܻ᷵»Ø·ÇÔ¤ÆÚµÄ½á¹û¡£¶ÔÓÚ 2GB µ½ 4GB + Ö®¼äµÄÎļþͨ³£¿ÉÒÔʹÓà + <literal>sprintf("%u", filesize($file))</literal> À´¿Ë·þ´ËÎÊÌâ¡£ + </simpara> + </note> + ¬e.clearstatcache; + &tip.fopen-wrapper.stat; + <para> + <example> + <title><function>filesize</function> Àý×Ó</title> + <programlisting role="php"> <![CDATA[ <?php @@ -41,14 +42,14 @@ ?> ]]> - </programlisting> - </example> - </para> - <simpara> - ²Î¼û <function>file_exists</function>¡£ - </simpara> - </refsect1> - </refentry> + </programlisting> + </example> + </para> + <simpara> + ²Î¼û <function>file_exists</function>¡£ + </simpara> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/diff.php/phpdoc-zh/reference/filesystem/functions/flock.xml?r1=1.8&r2=1.9&ty=u Index: phpdoc-zh/reference/filesystem/functions/flock.xml diff -u phpdoc-zh/reference/filesystem/functions/flock.xml:1.8 phpdoc-zh/reference/filesystem/functions/flock.xml:1.9 --- phpdoc-zh/reference/filesystem/functions/flock.xml:1.8 Tue Aug 16 00:30:59 2005 +++ phpdoc-zh/reference/filesystem/functions/flock.xml Tue Sep 13 12:30:43 2005 @@ -1,74 +1,79 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.8 $ --> -<!-- $Author: lm92 $ --> +<!-- $Revision: 1.9 $ --> +<!-- $Author: dallas $ --> <!-- EN-Revision: 1.11 Maintainer: dallas Status: ready --> <!-- CREDITS: lm92 --> - <refentry id="function.flock"> - <refnamediv> - <refname>flock</refname> - <refpurpose>Çá±ãµÄ×ÉѯÎļþËø¶¨</refpurpose> - </refnamediv> - <refsect1> - <title>˵Ã÷</title> - <methodsynopsis> - <type>bool</type><methodname>flock</methodname> - <methodparam><type>int</type><parameter>handle</parameter></methodparam> - <methodparam><type>int</type><parameter>operation</parameter></methodparam> - <methodparam choice="opt"><type>int</type><parameter role="reference">wouldblock</parameter></methodparam> - </methodsynopsis> - <simpara> - PHP Ö§³ÖÒÔ×Éѯ·½Ê½£¨Ò²¾ÍÊÇ˵ËùÓзÃÎʳÌÐò±ØÐëʹÓÃͬһ·½Ê½Ëø¶¨, ·ñÔòËü²»»á¹¤×÷£©Ëø¶¨È«²¿ÎļþµÄÒ»ÖÖÇá±ã·½·¨¡£ - </simpara> - <note> - <para> - ÔÚ Windows Ï <function>flock</function> ½«»áÇ¿ÖÆÖ´ÐС£ - </para> - </note> - <simpara> - <function>flock</function> ²Ù×÷µÄ <parameter>handle</parameter> - ±ØÐëÊÇÒ»¸öÒѾ´ò¿ªµÄÎļþÖ¸Õë¡£<parameter>operation</parameter> - ¿ÉÒÔÊÇÒÔÏÂÖµÖ®Ò»£º - </simpara> - <para> - <itemizedlist> - <listitem> - <simpara> - ҪȡµÃ¹²ÏíËø¶¨£¨¶ÁÈ¡³ÌÐò£©£¬½« - <parameter>operation</parameter> ÉèΪ <constant>LOCK_SH</constant>£¨PHP 4.0.1 ÒÔǰµÄ°æ±¾ÉèÖÃΪ 1£©¡£ - </simpara> - </listitem> - <listitem> - <simpara> - ҪȡµÃ¶ÀÕ¼Ëø¶¨£¨Ð´Èë³ÌÐò£©£¬½« - <parameter>operation</parameter> ÉèΪ <constant>LOCK_EX</constant>£¨PHP 4.0.1 ÒÔǰµÄ°æ±¾ÖÐÉèÖÃΪ 2£©¡£ - </simpara> - </listitem> - <listitem> - <simpara> - ÒªÊÍ·ÅËø¶¨£¨ÎÞÂÛ¹²Ïí»ò¶ÀÕ¼£©£¬½« - <parameter>operation</parameter> ÉèΪ <constant>LOCK_UN</constant>£¨PHP 4.0.1 ÒÔǰµÄ°æ±¾ÖÐÉèÖÃΪ 3£©¡£ - </simpara> - </listitem> - <listitem> - <simpara> - Èç¹ûÄ㲻ϣÍû <function>flock</function> ÔÚËø¶¨Ê±¶ÂÈû£¬Ôò¸ø - <parameter>operation</parameter> ¼ÓÉÏ <constant>LOCK_NB</constant>£¨PHP 4.0.1 ÒÔǰµÄ°æ±¾ÖÐÉèÖÃΪ 4£©¡£ - </simpara> - </listitem> - </itemizedlist> - </para> - <simpara> - <function>flock</function> ÔÊÐíÄãÖ´ÐÐÒ»¸ö¼òµ¥µÄ¿ÉÒÔÔÚÈÎºÎÆ½Ì¨ÖÐʹÓõĶÁÈ¡/дÈëÄ£ÐÍ£¨°üÀ¨´ó²¿·ÖµÄ - Unix ÅÉÉú°æºÍÉõÖÁÊÇ Windows£©¡£Èç¹ûËø¶¨»á¶ÂÈûµÄ»°£¨EWOULDBLOCK ´íÎóÂëÇé¿öÏ£©£¬Ç뽫¿ÉÑ¡µÄµÚÈý¸ö²ÎÊýÉèÖÃΪ &true;¡£Ëø¶¨²Ù×÷Ò²¿ÉÒÔ±» - <function>fclose</function> ÊÍ·Å£¨´úÂëÖ´ÐÐÍê±ÏʱҲ»á×Ô¶¯µ÷Óã©¡£ - </simpara> - <simpara> - &return.success; - </simpara> - <para> - <example> - <title><function>flock</function> Àý×Ó</title> - <programlisting role="php"> +<refentry id="function.flock"> + <refnamediv> + <refname>flock</refname> + <refpurpose>Çá±ãµÄ×ÉѯÎļþËø¶¨</refpurpose> + </refnamediv> + <refsect1> + <title>˵Ã÷</title> + <methodsynopsis> + <type>bool</type><methodname>flock</methodname> + <methodparam><type>int</type><parameter>handle</parameter></methodparam> + <methodparam><type>int</type><parameter>operation</parameter></methodparam> + <methodparam choice="opt"><type>int</type><parameter role="reference">wouldblock</parameter></methodparam> + </methodsynopsis> + <simpara> + PHP Ö§³ÖÒÔ×Éѯ·½Ê½£¨Ò²¾ÍÊÇ˵ËùÓзÃÎʳÌÐò±ØÐëʹÓÃͬһ·½Ê½Ëø¶¨, ·ñÔòËü²»»á¹¤×÷£©Ëø¶¨È«²¿ÎļþµÄÒ»ÖÖÇá±ã·½·¨¡£ + </simpara> + <note> + <para> + ÔÚ Windows Ï <function>flock</function> ½«»áÇ¿ÖÆÖ´ÐС£ + </para> + </note> + <simpara> + <function>flock</function> ²Ù×÷µÄ <parameter>handle</parameter> + ±ØÐëÊÇÒ»¸öÒѾ´ò¿ªµÄÎļþÖ¸Õë¡£<parameter>operation</parameter> + ¿ÉÒÔÊÇÒÔÏÂÖµÖ®Ò»£º + </simpara> + <para> + <itemizedlist> + <listitem> + <simpara> + ҪȡµÃ¹²ÏíËø¶¨£¨¶ÁÈ¡µÄ³ÌÐò£©£¬½« + <parameter>operation</parameter> ÉèΪ + <constant>LOCK_SH</constant>£¨PHP 4.0.1 ÒÔǰµÄ°æ±¾ÉèÖÃΪ 1£©¡£ + </simpara> + </listitem> + <listitem> + <simpara> + ҪȡµÃ¶ÀÕ¼Ëø¶¨£¨Ð´ÈëµÄ³ÌÐò£©£¬½« + <parameter>operation</parameter> ÉèΪ + <constant>LOCK_EX</constant>£¨PHP 4.0.1 ÒÔǰµÄ°æ±¾ÖÐÉèÖÃΪ 2£©¡£ + </simpara> + </listitem> + <listitem> + <simpara> + ÒªÊÍ·ÅËø¶¨£¨ÎÞÂÛ¹²Ïí»ò¶ÀÕ¼£©£¬½« + <parameter>operation</parameter> ÉèΪ + <constant>LOCK_UN</constant>£¨PHP 4.0.1 ÒÔǰµÄ°æ±¾ÖÐÉèÖÃΪ 3£©¡£ + </simpara> + </listitem> + <listitem> + <simpara> + Èç¹û²»Ï£Íû <function>flock</function> ÔÚËø¶¨Ê±¶ÂÈû£¬Ôò¸ø + <parameter>operation</parameter> ¼ÓÉÏ + <constant>LOCK_NB</constant>£¨PHP 4.0.1 ÒÔǰµÄ°æ±¾ÖÐÉèÖÃΪ 4£©¡£ + </simpara> + </listitem> + </itemizedlist> + </para> + <simpara> + <function>flock</function> ÔÊÐíÖ´ÐÐÒ»¸ö¼òµ¥µÄ¿ÉÒÔÔÚÈÎºÎÆ½Ì¨ÖÐʹÓõĶÁÈ¡/дÈëÄ£ÐÍ£¨°üÀ¨´ó²¿·ÖµÄ + Unix ÅÉÉú°æºÍÉõÖÁÊÇ Windows£©¡£Èç¹ûËø¶¨»á¶ÂÈûµÄ»°£¨EWOULDBLOCK + ´íÎóÂëÇé¿öÏ£©£¬¿ÉÑ¡µÄµÚÈý¸ö²ÎÊý»á±»ÉèÖÃΪ &true;¡£Ëø¶¨²Ù×÷Ò²¿ÉÒÔ±» + <function>fclose</function> ÊÍ·Å£¨´úÂëÖ´ÐÐÍê±ÏʱҲ»á×Ô¶¯µ÷Óã©¡£ + </simpara> + <simpara> + &return.success; + </simpara> + <para> + <example> + <title><function>flock</function> Àý×Ó</title> + <programlisting role="php"> <![CDATA[ <?php @@ -85,35 +90,34 @@ ?> ]]> - </programlisting> - </example> - </para> - <note> - <para> - ÓÉÓÚ <function>flock</function> - ÐèÒªÒ»¸öÎļþÖ¸Õ룬 Òò´ËÄã¿ÉÄÜÐèÒªÒ»¸öËø¶¨ÎļþÀ´±£»¤µ½Äã´òËãͨ¹ýдģʽ´ò¿ªÀ´½Ø¶ÏµÄÎļþµÄ·ÃÎÊ£¨ÔÚ - <function>fopen</function> º¯ÊýÖмÓÈë "w" »ò "w+"£©¡£ - </para> - </note> - <warning> - <para> - <function>flock</function> ²»ÄÜÔÚ NFS - ÒÔ¼°ÆäËûµÄÒ»Ð©ÍøÂçÎļþϵͳÖÐÕý³£¹¤×÷¡£Ïêϸ×ÊÁÏÇë¼ì²éÄãµÄ²Ù×÷ϵͳÎĵµ¡£ - </para> - <para> - ÔÚ²¿·Ö²Ù×÷ϵͳÖУ¬<function>flock</function> ÒÔ´¦Àí¼¶Ö´ÐС£µ±ÓÃÒ»¸ö¶àÏ̷߳þÎñÆ÷ - API£¨±ÈÈç ISAPI£©Ê±£¬Äú¿ÉÄܲ»¿ÉÒÔÒÀ¿¿ - <function>flock</function> À´±£»¤Îļþ£¬ÒòΪÔÚͬһ·þÎñÆ÷ÄÚÔËÐÐÔÚÆäËüÏß³ÌµÄ - PHP ½Å±¾¿ÉÒÔ¶Ô¸ÃÎļþ½øÐд¦Àí¡£ - </para> - <para> - <function>flock</function> ²»Ö§³Ö¾ÉµÄÎļþϵͳ£¬Èç <literal>FAT</literal> - ÒÔ¼°ËüµÄÅÉÉúϵͳ¡£Òò´Ë£¬ËüÔÚÕâÖÖÇé¿öϾ³£»á·µ»ØÒ»¸ö &false; - Öµ£¨ÓÈÆäÊÇÖ¸ Windows 98 µÄÓû§£©¡£ - </para> - </warning> - </refsect1> - </refentry> + </programlisting> + </example> + </para> + <note> + <para> + ÓÉÓÚ <function>flock</function> + ÐèÒªÒ»¸öÎļþÖ¸Õ룬 Òò´Ë¿ÉÄܲ»µÃ²»ÓÃÒ»¸öÌØÊâµÄËø¶¨ÎļþÀ´±£»¤´òËãͨ¹ýдģʽ´ò¿ªµÄÎļþµÄ·ÃÎÊ£¨ÔÚ + <function>fopen</function> º¯ÊýÖмÓÈë "w" »ò "w+"£©¡£ + </para> + </note> + <warning> + <para> + <function>flock</function> ²»ÄÜÓÃÓÚ NFS + ÒÔ¼°ÆäËüÒ»Ð©ÍøÂçÎļþϵͳ¡£Ïêϸ×ÊÁϲ鿴×Ô¼º²Ù×÷ϵͳµÄÎĵµ¡£ + </para> + <para> + ÔÚ²¿·Ö²Ù×÷ϵͳÖÐ <function>flock</function> ÒÔ½ø³Ì¼¶ÊµÏÖ¡£µ±ÓÃÒ»¸ö¶àÏ̷߳þÎñÆ÷ + API£¨±ÈÈç ISAPI£©Ê±£¬¿ÉÄܲ»¿ÉÒÔÒÀ¿¿ + <function>flock</function> À´±£»¤Îļþ£¬ÒòΪÔËÐÐÓÚͬһ·þÎñÆ÷ʵÀýÖÐÆäËü²¢ÐÐÏß³ÌµÄ + PHP ½Å±¾¿ÉÒÔ¶Ô¸ÃÎļþ½øÐд¦Àí¡£ + </para> + <para> + <function>flock</function> ²»Ö§³Ö¾ÉµÄÎļþϵͳ£¬Èç <literal>FAT</literal> + ÒÔ¼°ËüµÄÅÉÉúϵͳ¡£Òò´Ë£¬´Ë»·¾³ÏÂ×ÜÊÇ·µ»Ø &false;£¨ÓÈÆäÊÇ¶Ô Windows 98 Óû§À´Ëµ£©¡£ + </para> + </warning> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/diff.php/phpdoc-zh/reference/filesystem/functions/fnmatch.xml?r1=1.5&r2=1.6&ty=u Index: phpdoc-zh/reference/filesystem/functions/fnmatch.xml diff -u phpdoc-zh/reference/filesystem/functions/fnmatch.xml:1.5 phpdoc-zh/reference/filesystem/functions/fnmatch.xml:1.6 --- phpdoc-zh/reference/filesystem/functions/fnmatch.xml:1.5 Tue Aug 16 03:34:26 2005 +++ phpdoc-zh/reference/filesystem/functions/fnmatch.xml Tue Sep 13 12:30:43 2005 @@ -1,42 +1,40 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.5 $ --> -<!-- $Author: lm92 $ --> +<!-- $Revision: 1.6 $ --> +<!-- $Author: dallas $ --> <!-- EN-Revision: 1.10 Maintainer: dallas Status: ready --> - <refentry id="function.fnmatch"> - <refnamediv> - <refname>fnmatch</refname> - <refpurpose>ÓÃģʽƥÅäÎļþÃû</refpurpose> - </refnamediv> - <refsect1> - <title>˵Ã÷</title> - <methodsynopsis> - <type>bool</type><methodname>fnmatch</methodname> - <methodparam><type>string</type><parameter>pattern</parameter></methodparam> - <methodparam><type>string</type><parameter>string</parameter></methodparam> - <methodparam choice="opt"><type>int</type><parameter>flags</parameter></methodparam> - </methodsynopsis> - <para> - <function>fnmatch</function> - ¼ì²é´«ÈëµÄ - <parameter>string</parameter> - ÊÇ·ñÆ¥Å䏸³öµÄ shell ͳÅä·û - <parameter>pattern</parameter>¡£ - </para> - <para> - ´Ëº¯Êý¶ÔÓÚÎļþÃûÓÈÆäÓÐÓ㬵«Ò²¿ÉÒÔÓÃÓÚÆÕͨµÄ×Ö·û´®¡£ÆÕͨÓû§¿ÉÄÜϰ¹ßÓÚ - shell ģʽ»òÕßÖÁÉÙÆäÖÐ×î¼òµ¥µÄÐÎʽ - <literal>'?'</literal> ºÍ <literal>'*'</literal> - ͨÅä·û£¬Òò´ËʹÓà - <function>fnmatch</function> - À´´úÌæ <function>ereg</function> »òÕß - <function>preg_match</function> - À´½øÐÐǰ¶ËËÑË÷±í´ïʽÊäÈë¶ÔÓڷdzÌÐòÔ±Óû§¸ü¼Ó·½±ã¡£ - </para> - <example> - <title> - Óà shell ÖеÄͨÅä·ûģʽƥÅäÀ´¼ì²éÑÕÉ« - </title> - <programlisting role="php"> +<refentry id="function.fnmatch"> + <refnamediv> + <refname>fnmatch</refname> + <refpurpose>ÓÃģʽƥÅäÎļþÃû</refpurpose> + </refnamediv> + <refsect1> + <title>˵Ã÷</title> + <methodsynopsis> + <type>bool</type><methodname>fnmatch</methodname> + <methodparam><type>string</type><parameter>pattern</parameter></methodparam> + <methodparam><type>string</type><parameter>string</parameter></methodparam> + <methodparam choice="opt"><type>int</type><parameter>flags</parameter></methodparam> + </methodsynopsis> + <para> + <function>fnmatch</function> + ¼ì²é´«ÈëµÄ + <parameter>string</parameter> + ÊÇ·ñÆ¥Å䏸³öµÄ shell ͳÅä·û + <parameter>pattern</parameter>¡£ + </para> + <para> + ´Ëº¯Êý¶ÔÓÚÎļþÃûÓÈÆäÓÐÓ㬵«Ò²¿ÉÒÔÓÃÓÚÆÕͨµÄ×Ö·û´®¡£ÆÕͨÓû§¿ÉÄÜϰ¹ßÓÚ + shell ģʽ»òÕßÖÁÉÙÆäÖÐ×î¼òµ¥µÄÐÎʽ + <literal>'?'</literal> ºÍ <literal>'*'</literal> + ͨÅä·û£¬Òò´ËʹÓà + <function>fnmatch</function> + À´´úÌæ <function>ereg</function> »òÕß + <function>preg_match</function> + À´½øÐÐǰ¶ËËÑË÷±í´ïʽÊäÈë¶ÔÓڷdzÌÐòÔ±Óû§¸ü¼Ó·½±ã¡£ + </para> + <example> + <title>Óà shell ÖеÄͨÅä·ûģʽƥÅäÀ´¼ì²éÑÕÉ«</title> + <programlisting role="php"> <![CDATA[ <?php if (fnmatch("*gr[ae]y", $color)) { @@ -44,20 +42,20 @@ } ?> ]]> - </programlisting> - </example> - <warning> - <para> - Ŀǰ¸Ãº¯ÊýÎÞ·¨ÔÚ Windows »òÆäËü·Ç POSIX ¼æÈݵÄϵͳÉÏʹÓà - </para> - </warning> - <para> - ²Î¼û - <function>glob</function>£¬<function>ereg</function>£¬<function>preg_match</function> - ºÍ UNIX ÖÐ <literal>fnmatch(3)</literal> µÄÊÖ²áÖеıêÖ¾Ãû£¨Ö»Òª±¾ÎĵµÖл¹Î´°üÀ¨ËüÃÇ<!-- TODO hartmut -->£©¡£ - </para> - </refsect1> - </refentry> + </programlisting> + </example> + <warning> + <para> + Ŀǰ¸Ãº¯ÊýÎÞ·¨ÔÚ Windows »òÆäËü·Ç POSIX ¼æÈݵÄϵͳÉÏʹÓᣠ+ </para> + </warning> + <para> + ²Î¼û + <function>glob</function>£¬<function>ereg</function>£¬<function>preg_match</function> + ºÍ Unix ÖÐ <literal>fnmatch(3)</literal> µÄÊÖ²áÖеıêÖ¾Ãû£¨Ö»Òª±¾ÎĵµÖл¹Î´°üÀ¨ËüÃÇ£©¡£ + </para> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/diff.php/phpdoc-zh/reference/filesystem/functions/fopen.xml?r1=1.7&r2=1.8&ty=u Index: phpdoc-zh/reference/filesystem/functions/fopen.xml diff -u phpdoc-zh/reference/filesystem/functions/fopen.xml:1.7 phpdoc-zh/reference/filesystem/functions/fopen.xml:1.8 --- phpdoc-zh/reference/filesystem/functions/fopen.xml:1.7 Tue Aug 16 00:19:29 2005 +++ phpdoc-zh/reference/filesystem/functions/fopen.xml Tue Sep 13 12:30:43 2005 @@ -1,204 +1,199 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.7 $ --> -<!-- $Author: lm92 $ --> +<!-- $Revision: 1.8 $ --> +<!-- $Author: dallas $ --> <!-- EN-Revision: 1.27 Maintainer: dallas Status: ready --> <!-- CREDITS: lm92 --> - <refentry id="function.fopen"> - <refnamediv> - <refname>fopen</refname> - <refpurpose>´ò¿ªÎļþ»òÕß URL</refpurpose> - </refnamediv> - <refsect1> - <title>˵Ã÷</title> - <methodsynopsis> - <type>resource</type><methodname>fopen</methodname> - <methodparam><type>string</type><parameter>filename</parameter></methodparam> - <methodparam><type>string</type><parameter>mode</parameter></methodparam> - <methodparam choice="opt"><type>bool</type><parameter>use_include_path</parameter></methodparam> - <methodparam choice="opt"><type>resource</type><parameter>zcontext</parameter></methodparam> - </methodsynopsis> - <simpara> - <function>fopen</function> ½« - <parameter>filename</parameter> - Ö¸¶¨µÄÃû×Ö×ÊÔ´°ó¶¨µ½Ò»¸öÁ÷ÉÏ¡£Èç¹û - <parameter>filename</parameter> - ÊÇ "scheme://..." µÄ¸ñʽ£¬Ôò±»µ±³ÉÒ»¸ö - URL£¬PHP ½«ËÑË÷ÐÒé´¦ÀíÆ÷£¨Ò²±»³ÆÎª·â×°ÐÒ飩À´´¦Àí´Ëģʽ¡£Èç¹û¸ÃÐÒéÉÐδע²á·â×°ÐÒ飬PHP - ½«·¢³öÒ»ÌõÏûÏ¢À´°ïÖú¼ì²é½Å±¾ÖÐDZÔÚµÄÎÊÌâ²¢½« - <parameter>filename</parameter> - µ±³ÉÒ»¸öÆÕͨµÄÎļþÃû¼ÌÐøÖ´ÐÐÏÂÈ¥¡£ - </simpara> - <simpara> - Èç¹û PHP ÈÏΪ - <parameter>filename</parameter> - Ö¸¶¨µÄÊÇÒ»¸ö±¾µØÎļþ£¬½«³¢ÊÔÔÚ¸ÃÎļþÉÏ´ò¿ªÒ»¸öÁ÷¡£¸ÃÎļþ±ØÐëÊÇ - PHP ¿ÉÒÔ·ÃÎʵģ¬Òò´ËÐèҪȷÈÏÎļþ·ÃÎÊȨÏÞÔÊÐí¸Ã·ÃÎÊ¡£Èç¹û¼¤»îÁË - &safemode; »òÕß - <link linkend="ini.open-basedir">open_basedir</link> - Ôò»áÓ¦ÓýøÒ»²½µÄÏÞÖÆ¡£ - </simpara> - <simpara> - Èç¹û PHP ÈÏΪ - <parameter>filename</parameter> - Ö¸¶¨µÄÊÇÒ»¸öÒÑ×¢²áµÄÐÒ飬¶ø¸ÃÐÒé±»×¢²áΪһ¸öÍøÂç - URL£¬PHP ½«¼ì²é²¢È·ÈÏ - <link linkend="ini.allow-url-fopen">allow_url_fopen</link> - Òѱ»¼¤»î¡£Èç¹û¹Ø±ÕÁË£¬PHP ½«·¢³öÒ»¸ö¾¯¸æ£¬¶ø fopen µÄµ÷ÓÃÔòʧ°Ü¡£ - </simpara> - <note> - <simpara> - ËùÖ§³ÖµÄÐÒéÁбí¼û<xref linkend="wrappers"/>¡£Ä³Ð©ÐÒ飨Ҳ±»³ÆÎª - <literal>wrappers</literal>£©Ö§³Ö - <literal>context</literal> ºÍ &php.ini; - Ñ¡Ïî¡£²Î¼ûÏàÓ¦µÄÒ³ÃæÄÄЩѡÏî¿ÉÒÔ±»É趨¡££¨Ò²¾ÍÊÇ - &php.ini; µÄÖµ - <literal>user_agent</literal> ÓÃÔÚ <literal>http</literal> ÐÒéÖС££©ÓÐ¹Ø - </simpara> - </note> - ¬e.context-support; - <note> - <simpara> - ×Ô PHP 4.3.2 - Æð£¬¶ÔËùÓÐÇø±ð¶þ½øÖƺÍÎı¾Ä£Ê½µÄƽ̨ĬÈÏģʽ¶¼±»ÉèΪ¶þ½øÖÆÄ£Ê½¡£Èç¹ûÄãÔÚÉý¼¶ºó½Å±¾Åöµ½ÎÊÌ⣬³¢ÊÔÔÝʱʹÓà - <literal>'t'</literal> ±ê¼Ç£¬Ö±µ½ËùÓеĽű¾¶¼ÕÕÒÔÏÂËù˵µÄ¸ÄΪ¸ü¾ßÒÆÖ²ÐÔÒÔºó¡£ - </simpara> - </note> - <para> - <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> - <row> - <entry><literal>'x'</literal></entry> - <entry> - ´´½¨²¢ÒÔдÈ뷽ʽ´ò¿ª£¬½«ÎļþÖ¸ÕëÖ¸ÏòÎļþÍ·¡£Èç¹ûÎļþÒÑ´æÔÚ£¬Ôò - <function>fopen</function> µ÷ÓÃʧ°Ü²¢·µ»Ø &false;£¬²¢Éú³ÉÒ»Ìõ - <constant>E_WARNING</constant> ¼¶±ðµÄ´íÎóÐÅÏ¢¡£Èç¹ûÎļþ²»´æÔÚÔò³¢ÊÔ´´½¨Ö®¡£ÕâºÍ¸ø - µ×²ãµÄ <literal>open(2)</literal> ϵͳµ÷ÓÃÖ¸¶¨ - <literal>O_EXCL|O_CREAT</literal> ±ê¼ÇÊǵȼ۵ġ£´ËÑ¡Ïî±» - PHP 4.3.2 ÒÔ¼°ÒÔºóµÄ°æ±¾ËùÖ§³Ö£¬½öÄÜÓÃÓÚ±¾µØÎļþ¡£ - </entry> - </row> - <row> - <entry><literal>'x+'</literal></entry> - <entry> - ´´½¨²¢ÒÔ¶Áд·½Ê½´ò¿ª£¬½«ÎļþÖ¸ÕëÖ¸ÏòÎļþÍ·¡£Èç¹ûÎļþÒÑ´æÔÚ£¬Ôò - <function>fopen</function> µ÷ÓÃʧ°Ü²¢·µ»Ø &false;£¬²¢Éú³ÉÒ»Ìõ - <constant>E_WARNING</constant> ¼¶±ðµÄ´íÎóÐÅÏ¢¡£Èç¹ûÎļþ²»´æÔÚÔò³¢ÊÔ´´½¨Ö®¡£ÕâºÍ¸ø - µ×²ãµÄ <literal>open(2)</literal> ϵͳµ÷ÓÃÖ¸¶¨ - <literal>O_EXCL|O_CREAT</literal> ±ê¼ÇÊǵȼ۵ġ£´ËÑ¡Ïî±» - PHP 4.3.2 ÒÔ¼°ÒÔºóµÄ°æ±¾ËùÖ§³Ö£¬½öÄÜÓÃÓÚ±¾µØÎļþ¡£ - </entry> - </row> - </tbody> - </tgroup> - </table> - </para> - <note> - <para> - ²»Í¬µÄ²Ù×÷ϵͳ¼Ò×å¾ßÓв»Í¬µÄÐнáÊøÏ°¹ß¡£µ±ÄãдÈëÒ»¸öÎı¾Îļþ²¢Ïë²åÈëÒ»¸öÐÂÐÐʱ£¬ÄãÐèҪʹÓ÷ûºÏÄã²Ù×÷ϵͳµÄÐнáÊø·ûºÅ¡£»ùÓÚ - Unix µÄϵͳʹÓà <literal>\n</literal> - ×÷ΪÐнáÊø×Ö·û£¬»ùÓÚ Windows µÄϵͳʹÓà <literal>\r\n</literal> - ×÷ΪÐнáÊø×Ö·û£¬»ùÓÚ Macintosh µÄϵͳʹÓà <literal>\r</literal> - ×÷ΪÐнáÊø×Ö·û¡£ - </para> - <para> - Èç¹ûдÈëÎļþʱʹÓÃÁË´íÎóµÄÐнáÊø·ûºÅ£¬ÔòÆäËüÓ¦ÓóÌÐò´ò¿ªÕâЩÎļþʱ¿ÉÄÜ»á±íÏֵúܹÖÒì¡£ - </para> - <para> - Windows ÏÂÌṩÁËÒ»¸öÎı¾×ª»»±ê¼Ç£¨<literal>'t'</literal>£©¿ÉÒÔ͸Ã÷µØ½« - <literal>\n</literal> ת»»Îª <literal>\r\n</literal>¡£Óë´Ë¶ÔÓ¦Ä㻹¿ÉÒÔʹÓà - <literal>'b'</literal> À´Ç¿ÖÆÊ¹Óöþ½øÖÆÄ£Ê½£¬ÕâÑù¾Í²»»áת»»ÄãµÄÊý¾Ý¡£ÒªÊ¹ÓÃÕâЩ±ê¼Ç£¬ÒªÃ´Óà - <literal>'b'</literal> »òÕßÓà <literal>'t'</literal> ×÷Ϊ - <parameter>mode</parameter> ²ÎÊýµÄ×îºóÒ»¸ö×Ö·û¡£ - </para> - <para> - ĬÈϵÄת»»Ä£Ê½ÒÀÀµÓÚ SAPI ºÍÄãʹÓÃµÄ PHP - °æ±¾£¬Òò´ËΪÁ˱ãÓÚÒÆÖ²¹ÄÀøÄã×ÜÊÇÖ¸¶¨Ç¡µ±µÄ±ê¼Ç¡£µ±²Ù×÷ÒÔ - <literal>\n</literal> ×÷ΪÐнáÊø¶¨½ç·ûµÄ´¿Îı¾Îļþʱ£¬Èç¹ûÄ㻹ÆÚÍûÕâЩÎļþ¿ÉÒÔÓÃÓÚÆäËüÓ¦ÓóÌÐòÀýÈç - Notepad£¬ÔòÓ¦¸ÃÔڽű¾ÖÐʹÓà <literal>'t'</literal> - ģʽ¡£ÔÚËùÓÐÆäËüÇé¿öÏÂʹÓà <literal>'b'</literal>¡£ - </para> - <para> - ÔÚ²Ù×÷¶þ½øÖÆÎļþʱÈç¹ûûÓÐÖ¸¶¨ <literal>'b'</literal> - ±ê¼Ç£¬¿ÉÄÜ»áÅöµ½Ò»Ð©Ææ¹ÖµÄÎÊÌ⣬°üÀ¨»µµôµÄͼƬÎļþÒÔ¼°¹ØÓÚ - <literal>\r\n</literal> ×Ö·ûµÄÆæ¹ÖÎÊÌâ¡£ - </para> - </note> - <note> - <para> - ÎªÒÆÖ²ÐÔ¿¼ÂÇ£¬Ç¿ÁÒ½¨ÒéÔÚÓà <function>fopen</function> - ´ò¿ªÎļþʱ×ÜÊÇʹÓà <literal>'b'</literal> ±ê¼Ç¡£ - </para> - </note> - <note> - <para> - ÔÙÒ»´Î£¬ÎªÒÆÖ²ÐÔ¿¼ÂÇ£¬Ç¿ÁÒ½¨ÒéÄãÖØÐ´ÄÇЩÒÀÀµÓÚ - <literal>'t'</literal> ģʽµÄ´úÂëʹÆäʹÓÃÕýÈ·µÄÐнáÊø·û²¢¸Ä³É - <literal>'b'</literal> ģʽ¡£ - </para> - </note> - <para> - Èç¹ûÒ²ÐèÒªÔÚ - <link linkend="ini.include-path">include_path</link> - ÖÐËÑѰÎļþµÄ»°£¬¿ÉÒÔ½«¿ÉÑ¡µÄµÚÈý¸ö²ÎÊý - <parameter>use_include_path</parameter> - ÉèΪ '1' »ò &true;¡£ - </para> - <simpara> - Èç¹û´ò¿ªÊ§°Ü£¬±¾º¯Êý·µ»Ø &false;¡£ - </simpara> - <para> - <example> - <title><function>fopen</function> Àý×Ó</title> - <programlisting role="php"> +<refentry id="function.fopen"> + <refnamediv> + <refname>fopen</refname> + <refpurpose>´ò¿ªÎļþ»òÕß URL</refpurpose> + </refnamediv> + <refsect1> + <title>˵Ã÷</title> + <methodsynopsis> + <type>resource</type><methodname>fopen</methodname> + <methodparam><type>string</type><parameter>filename</parameter></methodparam> + <methodparam><type>string</type><parameter>mode</parameter></methodparam> + <methodparam choice="opt"><type>bool</type><parameter>use_include_path</parameter></methodparam> + <methodparam choice="opt"><type>resource</type><parameter>zcontext</parameter></methodparam> + </methodsynopsis> + <simpara> + <function>fopen</function> ½« + <parameter>filename</parameter> + Ö¸¶¨µÄÃû×Ö×ÊÔ´°ó¶¨µ½Ò»¸öÁ÷ÉÏ¡£Èç¹û + <parameter>filename</parameter> + ÊÇ "scheme://..." µÄ¸ñʽ£¬Ôò±»µ±³ÉÒ»¸ö + URL£¬PHP ½«ËÑË÷ÐÒé´¦ÀíÆ÷£¨Ò²±»³ÆÎª·â×°ÐÒ飩À´´¦Àí´Ëģʽ¡£Èç¹û¸ÃÐÒéÉÐδע²á·â×°ÐÒ飬PHP + ½«·¢³öÒ»ÌõÏûÏ¢À´°ïÖú¼ì²é½Å±¾ÖÐDZÔÚµÄÎÊÌâ²¢½« + <parameter>filename</parameter> + µ±³ÉÒ»¸öÆÕͨµÄÎļþÃû¼ÌÐøÖ´ÐÐÏÂÈ¥¡£ + </simpara> + <simpara> + Èç¹û PHP ÈÏΪ + <parameter>filename</parameter> + Ö¸¶¨µÄÊÇÒ»¸ö±¾µØÎļþ£¬½«³¢ÊÔÔÚ¸ÃÎļþÉÏ´ò¿ªÒ»¸öÁ÷¡£¸ÃÎļþ±ØÐëÊÇ + PHP ¿ÉÒÔ·ÃÎʵģ¬Òò´ËÐèҪȷÈÏÎļþ·ÃÎÊȨÏÞÔÊÐí¸Ã·ÃÎÊ¡£Èç¹û¼¤»îÁË&safemode;»òÕß + <link linkend="ini.open-basedir">open_basedir</link> + Ôò»áÓ¦ÓýøÒ»²½µÄÏÞÖÆ¡£ + </simpara> + <simpara> + Èç¹û PHP ÈÏΪ + <parameter>filename</parameter> + Ö¸¶¨µÄÊÇÒ»¸öÒÑ×¢²áµÄÐÒ飬¶ø¸ÃÐÒé±»×¢²áΪһ¸öÍøÂç + URL£¬PHP ½«¼ì²é²¢È·ÈÏ + <link linkend="ini.allow-url-fopen">allow_url_fopen</link> + Òѱ»¼¤»î¡£Èç¹û¹Ø±ÕÁË£¬PHP ½«·¢³öÒ»¸ö¾¯¸æ£¬¶ø fopen µÄµ÷ÓÃÔòʧ°Ü¡£ + </simpara> + <note> + <simpara> + ËùÖ§³ÖµÄÐÒéÁбí¼û<xref linkend="wrappers"/>¡£Ä³Ð©ÐÒ飨Ҳ±»³ÆÎª + <literal>wrappers</literal>£©Ö§³Ö + <literal>context</literal> ºÍ£¯»ò &php.ini; + Ñ¡Ïî¡£²Î¼ûÏàÓ¦µÄÒ³ÃæÄÄЩѡÏî¿ÉÒÔ±»É趨£¨ÀýÈç &php.ini; ÖÐÓÃÓÚ + <literal>http</literal> wrapper µÄ <literal>user_agent</literal> Öµ£©¡£ + </simpara> + </note> + ¬e.context-support; + <note> + <simpara> + ×Ô PHP 4.3.2 + Æð£¬¶ÔËùÓÐÇø±ð¶þ½øÖƺÍÎı¾Ä£Ê½µÄƽ̨ĬÈÏģʽ¶¼±»ÉèΪ¶þ½øÖÆÄ£Ê½¡£Èç¹ûÔÚÉý¼¶ºó½Å±¾Åöµ½ÎÊÌ⣬³¢ÊÔÔÝʱʹÓà + <literal>'t'</literal> ±ê¼Ç£¬Ö±µ½ËùÓеĽű¾¶¼ÕÕÒÔÏÂËù˵µÄ¸ÄΪ¸ü¾ßÒÆÖ²ÐÔÒÔºó¡£ + </simpara> + </note> + <para> + <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> + <row> + <entry><literal>'x'</literal></entry> + <entry> + ´´½¨²¢ÒÔдÈ뷽ʽ´ò¿ª£¬½«ÎļþÖ¸ÕëÖ¸ÏòÎļþÍ·¡£Èç¹ûÎļþÒÑ´æÔÚ£¬Ôò + <function>fopen</function> µ÷ÓÃʧ°Ü²¢·µ»Ø &false;£¬²¢Éú³ÉÒ»Ìõ + <constant>E_WARNING</constant> ¼¶±ðµÄ´íÎóÐÅÏ¢¡£Èç¹ûÎļþ²»´æÔÚÔò³¢ÊÔ´´½¨Ö®¡£ÕâºÍ¸ø + µ×²ãµÄ <literal>open(2)</literal> ϵͳµ÷ÓÃÖ¸¶¨ + <literal>O_EXCL|O_CREAT</literal> ±ê¼ÇÊǵȼ۵ġ£´ËÑ¡Ïî±» + PHP 4.3.2 ÒÔ¼°ÒÔºóµÄ°æ±¾ËùÖ§³Ö£¬½öÄÜÓÃÓÚ±¾µØÎļþ¡£ + </entry> + </row> + <row> + <entry><literal>'x+'</literal></entry> + <entry> + ´´½¨²¢ÒÔ¶Áд·½Ê½´ò¿ª£¬½«ÎļþÖ¸ÕëÖ¸ÏòÎļþÍ·¡£Èç¹ûÎļþÒÑ´æÔÚ£¬Ôò + <function>fopen</function> µ÷ÓÃʧ°Ü²¢·µ»Ø &false;£¬²¢Éú³ÉÒ»Ìõ + <constant>E_WARNING</constant> ¼¶±ðµÄ´íÎóÐÅÏ¢¡£Èç¹ûÎļþ²»´æÔÚÔò³¢ÊÔ´´½¨Ö®¡£ÕâºÍ¸ø + µ×²ãµÄ <literal>open(2)</literal> ϵͳµ÷ÓÃÖ¸¶¨ + <literal>O_EXCL|O_CREAT</literal> ±ê¼ÇÊǵȼ۵ġ£´ËÑ¡Ïî±» + PHP 4.3.2 ÒÔ¼°ÒÔºóµÄ°æ±¾ËùÖ§³Ö£¬½öÄÜÓÃÓÚ±¾µØÎļþ¡£ + </entry> + </row> + </tbody> + </tgroup> + </table> + </para> + <note> + <para> + ²»Í¬µÄ²Ù×÷ϵͳ¼Ò×å¾ßÓв»Í¬µÄÐнáÊøÏ°¹ß¡£µ±Ð´ÈëÒ»¸öÎı¾Îļþ²¢Ïë²åÈëÒ»¸öÐÂÐÐʱ£¬ÐèҪʹÓ÷ûºÏ²Ù×÷ϵͳµÄÐнáÊø·ûºÅ¡£»ùÓÚ + Unix µÄϵͳʹÓà <literal>\n</literal> + ×÷ΪÐнáÊø×Ö·û£¬»ùÓÚ Windows µÄϵͳʹÓà <literal>\r\n</literal> + ×÷ΪÐнáÊø×Ö·û£¬»ùÓÚ Macintosh µÄϵͳʹÓà <literal>\r</literal> + ×÷ΪÐнáÊø×Ö·û¡£ + </para> + <para> + Èç¹ûдÈëÎļþʱʹÓÃÁË´íÎóµÄÐнáÊø·ûºÅ£¬ÔòÆäËüÓ¦ÓóÌÐò´ò¿ªÕâЩÎļþʱ¿ÉÄÜ»á±íÏֵúܹÖÒì¡£ + </para> + <para> + Windows ÏÂÌṩÁËÒ»¸öÎı¾×ª»»±ê¼Ç£¨<literal>'t'</literal>£©¿ÉÒÔ͸Ã÷µØ½« + <literal>\n</literal> ת»»Îª <literal>\r\n</literal>¡£Óë´Ë¶ÔÓ¦»¹¿ÉÒÔʹÓà + <literal>'b'</literal> À´Ç¿ÖÆÊ¹Óöþ½øÖÆÄ£Ê½£¬ÕâÑù¾Í²»»áת»»Êý¾Ý¡£ÒªÊ¹ÓÃÕâЩ±ê¼Ç£¬ÒªÃ´Óà + <literal>'b'</literal> »òÕßÓà <literal>'t'</literal> ×÷Ϊ + <parameter>mode</parameter> ²ÎÊýµÄ×îºóÒ»¸ö×Ö·û¡£ + </para> + <para> + ĬÈϵÄת»»Ä£Ê½ÒÀÀµÓÚ SAPI ºÍËùʹÓÃµÄ PHP + °æ±¾£¬Òò´ËΪÁ˱ãÓÚÒÆÖ²¹ÄÀø×ÜÊÇÖ¸¶¨Ç¡µ±µÄ±ê¼Ç¡£Èç¹ûÊDzÙ×÷´¿Îı¾Îļþ²¢Ôڽű¾ÖÐʹÓÃÁË + <literal>\n</literal> ×÷ΪÐнáÊø·û£¬µ«»¹ÒªÆÚÍûÕâЩÎļþ¿ÉÒÔ±»ÆäËüÓ¦ÓóÌÐòÀýÈç + Notepad ¶ÁÈ¡£¬ÔòÔÚ mode ÖÐʹÓà + <literal>'t'</literal>¡£ÔÚËùÓÐÆäËüÇé¿öÏÂʹÓà <literal>'b'</literal>¡£ + </para> + <para> + ÔÚ²Ù×÷¶þ½øÖÆÎļþʱÈç¹ûûÓÐÖ¸¶¨ <literal>'b'</literal> + ±ê¼Ç£¬¿ÉÄÜ»áÅöµ½Ò»Ð©Ææ¹ÖµÄÎÊÌ⣬°üÀ¨»µµôµÄͼƬÎļþÒÔ¼°¹ØÓÚ + <literal>\r\n</literal> ×Ö·ûµÄÆæ¹ÖÎÊÌâ¡£ + </para> + </note> + <note> + <para> + ÎªÒÆÖ²ÐÔ¿¼ÂÇ£¬Ç¿ÁÒ½¨ÒéÔÚÓà <function>fopen</function> + ´ò¿ªÎļþʱ×ÜÊÇʹÓà <literal>'b'</literal> ±ê¼Ç¡£ + </para> + </note> + <note> + <para> + ÔÙÒ»´Î£¬ÎªÒÆÖ²ÐÔ¿¼ÂÇ£¬Ç¿ÁÒ½¨ÒéÄãÖØÐ´ÄÇЩÒÀÀµÓÚ + <literal>'t'</literal> ģʽµÄ´úÂëʹÆäʹÓÃÕýÈ·µÄÐнáÊø·û²¢¸Ä³É + <literal>'b'</literal> ģʽ¡£ + </para> + </note> + <para> + Èç¹ûÒ²ÐèÒªÔÚ + <link linkend="ini.include-path">include_path</link> + ÖÐËÑѰÎļþµÄ»°£¬¿ÉÒÔ½«¿ÉÑ¡µÄµÚÈý¸ö²ÎÊý + <parameter>use_include_path</parameter> + ÉèΪ '1' »ò &true;¡£ + </para> + <simpara> + Èç¹û´ò¿ªÊ§°Ü£¬±¾º¯Êý·µ»Ø &false;¡£ + </simpara> + <para> + <example> + <title><function>fopen</function> Àý×Ó</title> + <programlisting role="php"> <![CDATA[ <?php $handle = fopen("/home/rasmus/file.txt", "r"); @@ -207,33 +202,33 @@ $handle = fopen("ftp://user:password@example.com/somefile.txt", "w"); ?> ]]> - </programlisting> - </example> - </para> - <simpara> - Èç¹ûÔÚÓ÷þÎñÆ÷Ä£¿é°æ±¾µÄ PHP - ʱÔÚ´ò¿ªºÍдÈëÎļþÉÏÓöµ½ÎÊÌ⣬¼ÇסҪȷ±£ËùʹÓõÄÎļþÊÇ·þÎñÆ÷½ø³ÌËùÄܹ»·ÃÎʵġ£ - </simpara> - <para> - ÔÚ Windows ƽ̨ÉÏ£¬ÒªÐ¡ÐÄתÒåÎļþ·¾¶ÖеÄÿ¸ö·´Ð±Ïߣ¬»òÕßÓÃбÏß¡£ - <informalexample> - <programlisting role="php"> + </programlisting> + </example> + </para> + <simpara> + Èç¹ûÔÚÓ÷þÎñÆ÷Ä£¿é°æ±¾µÄ PHP + ʱÔÚ´ò¿ªºÍдÈëÎļþÉÏÓöµ½ÎÊÌ⣬¼ÇסҪȷ±£ËùʹÓõÄÎļþÊÇ·þÎñÆ÷½ø³ÌËùÄܹ»·ÃÎʵġ£ + </simpara> + <para> + ÔÚ Windows ƽ̨ÉÏ£¬ÒªÐ¡ÐÄתÒåÎļþ·¾¶ÖеÄÿ¸ö·´Ð±Ïߣ¬»òÕßÓÃбÏß¡£ + <informalexample> + <programlisting role="php"> <![CDATA[ <?php $handle = fopen("c:\\data\\info.txt", "r"); ?> ]]> - </programlisting> - </informalexample> - </para> - &warn.ssl-non-standard; - ¬e.sm.uidcheck.dir; - <simpara> - ²Î¼û<xref linkend="wrappers"/>£¬<function>fclose</function>£¬<function>fgets</function>£¬<function>fread</function>£¬<function>fwrite</function>£¬<function>fsockopen</function>£¬<function>file</function>£¬<function>file_exists</function>£¬<function>is_readable</function>£¬<function>stream_set_timeout</function> - ºÍ <function>popen</function>¡£ - </simpara> - </refsect1> - </refentry> + </programlisting> + </informalexample> + </para> + &warn.ssl-non-standard; + ¬e.sm.uidcheck.dir; + <simpara> + ²Î¼û<xref linkend="wrappers"/>£¬<function>fclose</function>£¬<function>fgets</function>£¬<function>fread</function>£¬<function>fwrite</function>£¬<function>fsockopen</function>£¬<function>file</function>£¬<function>file_exists</function>£¬<function>is_readable</function>£¬<function>stream_set_timeout</function> + ºÍ <function>popen</function>¡£ + </simpara> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/diff.php/phpdoc-zh/reference/filesystem/functions/fpassthru.xml?r1=1.9&r2=1.10&ty=u Index: phpdoc-zh/reference/filesystem/functions/fpassthru.xml diff -u phpdoc-zh/reference/filesystem/functions/fpassthru.xml:1.9 phpdoc-zh/reference/filesystem/functions/fpassthru.xml:1.10 --- phpdoc-zh/reference/filesystem/functions/fpassthru.xml:1.9 Thu Sep 1 11:41:36 2005 +++ phpdoc-zh/reference/filesystem/functions/fpassthru.xml Tue Sep 13 12:30:43 2005 @@ -1,56 +1,56 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.9 $ --> +<!-- $Revision: 1.10 $ --> <!-- $Author: dallas $ --> <!-- EN-Revision: 1.10 Maintainer: dallas Status: ready --> <!-- CREDITS: lm92 --> - <refentry id="function.fpassthru"> - <refnamediv> - <refname>fpassthru</refname> - <refpurpose>Êä³öÎļþÖ¸Õë´¦µÄËùÓÐÊ£ÓàÊý¾Ý</refpurpose> - </refnamediv> - <refsect1> - <title>˵Ã÷</title> - <methodsynopsis> - <type>int</type><methodname>fpassthru</methodname> - <methodparam><type>resource</type><parameter>handle</parameter></methodparam> - </methodsynopsis> - <simpara> - ½«¸ø¶¨µÄÎļþÖ¸Õë´Óµ±Ç°µÄλÖöÁÈ¡µ½ EOF ²¢°Ñ½á¹ûдµ½Êä³ö»º³åÇø¡£ - </simpara> - <simpara> - Èç¹û·¢Éú´íÎó£¬ <function>fpassthru</function> ·µ»Ø &false;¡£ - ·ñÔò <function>fpassthru</function> ·µ»Ø´Ó <parameter>handle</parameter> - ¶ÁÈ¡²¢´«µÝµ½Êä³öµÄ×Ö·ûÊýÄ¿¡£ - </simpara> - &fs.validfp.all; - <simpara> - Èç¹ûÒѾÏòÎļþдÈëÊý¾Ý£¬¾Í±ØÐëµ÷Óà <function>rewind</function> - À´½«ÎļþÖ¸ÕëÖ¸ÏòÎļþÍ·¡£ - </simpara> - <simpara> - Èç¹û¼È²»ÐÞ¸ÄÎļþÒ²²»ÔÚÌØ¶¨Î»ÖüìË÷£¬Ö»Ï뽫ÎļþµÄÄÚÈÝÏÂÔØµ½Êä³ö»º³åÇø£¬Ó¦¸ÃʹÓà - <function>readfile</function>£¬ÕâÑù¿ÉÒÔʡȥ - <function>fopen</function> µ÷Óᣠ- </simpara> - <note> - <para> - µ±ÔÚ Windows - ϵͳÖн« <function>fpassthru</function> - ÓÃÓÚ¶þ½øÖÆÎļþʱ£¬ÒªÈ·±£ÔÚÓà - <function>fopen</function> - ´ò¿ªÎļþʱÔÚ mode Öи½¼ÓÁË - <literal>b</literal> À´½«ÎļþÒÔ¶þ½øÖÆ·½Ê½´ò¿ª¡£ - </para> - <para> - ¹ÄÀøÔÚ´¦Àí¶þ½øÖÆÎļþʱʹÓà - <literal>b</literal> - ±êÖ¾£¬¼´Ê¹ÏµÍ³²¢²»ÐèÒª£¬ÕâÑù¿ÉÒÔʹ½Å±¾µÄÒÆÖ²ÐÔ¸üºÃ¡£ - </para> - </note> - <para> - <example> - <title>¶Ô¶þ½øÖÆÎļþʹÓà <function>fpassthru</function></title> - <programlisting role="php"> +<refentry id="function.fpassthru"> + <refnamediv> + <refname>fpassthru</refname> + <refpurpose>Êä³öÎļþÖ¸Õë´¦µÄËùÓÐÊ£ÓàÊý¾Ý</refpurpose> + </refnamediv> + <refsect1> + <title>˵Ã÷</title> + <methodsynopsis> + <type>int</type><methodname>fpassthru</methodname> + <methodparam><type>resource</type><parameter>handle</parameter></methodparam> + </methodsynopsis> + <simpara> + ½«¸ø¶¨µÄÎļþÖ¸Õë´Óµ±Ç°µÄλÖöÁÈ¡µ½ EOF ²¢°Ñ½á¹ûдµ½Êä³ö»º³åÇø¡£ + </simpara> + <simpara> + Èç¹û·¢Éú´íÎó£¬ <function>fpassthru</function> ·µ»Ø &false;¡£·ñÔò + <function>fpassthru</function> ·µ»Ø´Ó <parameter>handle</parameter> + ¶ÁÈ¡²¢´«µÝµ½Êä³öµÄ×Ö·ûÊýÄ¿¡£ + </simpara> + &fs.validfp.all; + <simpara> + Èç¹ûÒѾÏòÎļþдÈëÊý¾Ý£¬¾Í±ØÐëµ÷Óà <function>rewind</function> + À´½«ÎļþÖ¸ÕëÖ¸ÏòÎļþÍ·¡£ + </simpara> + <simpara> + Èç¹û¼È²»ÐÞ¸ÄÎļþÒ²²»ÔÚÌØ¶¨Î»ÖüìË÷£¬Ö»Ï뽫ÎļþµÄÄÚÈÝÏÂÔØµ½Êä³ö»º³åÇø£¬Ó¦¸ÃʹÓà + <function>readfile</function>£¬ÕâÑù¿ÉÒÔʡȥ + <function>fopen</function> µ÷Óᣠ+ </simpara> + <note> + <para> + µ±ÔÚ Windows + ϵͳÖн« <function>fpassthru</function> + ÓÃÓÚ¶þ½øÖÆÎļþʱ£¬ÒªÈ·±£ÔÚÓà + <function>fopen</function> + ´ò¿ªÎļþʱÔÚ mode Öи½¼ÓÁË + <literal>b</literal> À´½«ÎļþÒÔ¶þ½øÖÆ·½Ê½´ò¿ª¡£ + </para> + <para> + ¹ÄÀøÔÚ´¦Àí¶þ½øÖÆÎļþʱʹÓà + <literal>b</literal> + ±êÖ¾£¬¼´Ê¹ÏµÍ³²¢²»ÐèÒª£¬ÕâÑù¿ÉÒÔʹ½Å±¾µÄÒÆÖ²ÐÔ¸üºÃ¡£ + </para> + </note> + <para> + <example> + <title>¶Ô¶þ½øÖÆÎļþʹÓà <function>fpassthru</function></title> + <programlisting role="php"> <![CDATA[ <?php @@ -68,16 +68,16 @@ ?> ]]> - </programlisting> - </example> - </para> - <simpara> - ²Î¼û - <function>readfile</function>£¬<function>fopen</function>£¬<function>popen</function> - ºÍ <function>fsockopen</function>¡£ - </simpara> - </refsect1> - </refentry> + </programlisting> + </example> + </para> + <simpara> + ²Î¼û + <function>readfile</function>£¬<function>fopen</function>£¬<function>popen</function> + ºÍ <function>fsockopen</function>¡£ + </simpara> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/diff.php/phpdoc-zh/reference/filesystem/functions/fputs.xml?r1=1.6&r2=1.7&ty=u Index: phpdoc-zh/reference/filesystem/functions/fputs.xml diff -u phpdoc-zh/reference/filesystem/functions/fputs.xml:1.6 phpdoc-zh/reference/filesystem/functions/fputs.xml:1.7 --- phpdoc-zh/reference/filesystem/functions/fputs.xml:1.6 Sun Sep 4 02:03:19 2005 +++ phpdoc-zh/reference/filesystem/functions/fputs.xml Tue Sep 13 12:30:43 2005 @@ -1,11 +1,11 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.6 $ --> +<!-- $Revision: 1.7 $ --> <!-- $Author: dallas $ --> <!-- EN-Revision: 1.6 Maintainer: lm92 Status: ready --> <refentry id="function.fputs"> <refnamediv> <refname>fputs</refname> - <refpurpose><function>fwrite</function>µÄ&Alias;</refpurpose> + <refpurpose><function>fwrite</function> µÄ&Alias;</refpurpose> </refnamediv> <refsect1 role="description"> &reftitle.description; http://cvs.php.net/diff.php/phpdoc-zh/reference/filesystem/functions/fread.xml?r1=1.8&r2=1.9&ty=u Index: phpdoc-zh/reference/filesystem/functions/fread.xml diff -u phpdoc-zh/reference/filesystem/functions/fread.xml:1.8 phpdoc-zh/reference/filesystem/functions/fread.xml:1.9 --- phpdoc-zh/reference/filesystem/functions/fread.xml:1.8 Tue Aug 16 00:31:46 2005 +++ phpdoc-zh/reference/filesystem/functions/fread.xml Tue Sep 13 12:30:43 2005 @@ -1,70 +1,73 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.8 $ --> -<!-- $Author: lm92 $ --> +<!-- $Revision: 1.9 $ --> +<!-- $Author: dallas $ --> <!-- EN-Revision: 1.16 Maintainer: dallas Status: ready --> <!-- CREDITS: lm92 --> - <refentry id="function.fread"> - <refnamediv> - <refname>fread</refname> - <refpurpose>¶ÁÈ¡Îļþ£¨¿É°²È«ÓÃÓÚ¶þ½øÖÆÎļþ£©</refpurpose> - </refnamediv> - <refsect1> - <title>˵Ã÷</title> - <methodsynopsis> - <type>string</type><methodname>fread</methodname> - <methodparam><type>int</type><parameter>handle</parameter></methodparam> - <methodparam><type>int</type><parameter>length</parameter></methodparam> - </methodsynopsis> - <simpara> - <function>fread</function> ´ÓÎļþÖ¸Õë - <parameter>handle</parameter> ¶ÁÈ¡×î¶à - <parameter>length</parameter> ¸ö×Ö½Ú¡£ - ¸Ãº¯ÊýÔÚ¶ÁÈ¡Íê - <parameter>length</parameter> ¸ö×Ö½ÚÊý£¬»òµ½´ï - EOF µÄʱºò£¬»ò£¨¶ÔÓÚÍøÂçÁ÷£©µ±Ò»¸ö°ü¿ÉÓÃʱ¾Í»áÍ£Ö¹¶ÁÈ¡Îļþ£¬ÊÓºõÏÈÅöµ½ÄÄÖÖÇé¿ö¡£ - </simpara> - <para> - <informalexample> - <programlisting role="php"> +<refentry id="function.fread"> + <refnamediv> + <refname>fread</refname> + <refpurpose>¶ÁÈ¡Îļþ£¨¿É°²È«ÓÃÓÚ¶þ½øÖÆÎļþ£©</refpurpose> + </refnamediv> + <refsect1> + <title>˵Ã÷</title> + <methodsynopsis> + <type>string</type><methodname>fread</methodname> + <methodparam><type>int</type><parameter>handle</parameter></methodparam> + <methodparam><type>int</type><parameter>length</parameter></methodparam> + </methodsynopsis> + <simpara> + <function>fread</function> ´ÓÎļþÖ¸Õë + <parameter>handle</parameter> ¶ÁÈ¡×î¶à + <parameter>length</parameter> ¸ö×Ö½Ú¡£¸Ãº¯ÊýÔÚ¶ÁÈ¡Íê + <parameter>length</parameter> ¸ö×Ö½ÚÊý£¬»òµ½´ï + EOF µÄʱºò£¬»ò£¨¶ÔÓÚÍøÂçÁ÷£©µ±Ò»¸ö°ü¿ÉÓÃʱ¾Í»áÍ£Ö¹¶ÁÈ¡Îļþ£¬ÊÓºõÏÈÅöµ½ÄÄÖÖÇé¿ö¡£ + </simpara> + <para> + <informalexample> + <programlisting role="php"> <![CDATA[ +<?php // get contents of a file into a string $filename = "/usr/local/something.txt"; $handle = fopen($filename, "r"); $contents = fread($handle, filesize ($filename)); fclose($handle); +?> ]]> - </programlisting> - </informalexample> - </para> - <warning> - <para> - ÔÚÇø·Ö¶þ½øÖÆÎļþºÍÎı¾ÎļþµÄϵͳÉÏ£¨Èç - Windows£©´ò¿ªÎļþʱ£¬<function>fopen</function> º¯ÊýµÄ mode ²ÎÊýÒª¼ÓÉÏ 'b'¡£ - </para> - </warning> - <para> - <informalexample> - <programlisting role="php"> + </programlisting> + </informalexample> + </para> + <warning> + <para> + ÔÚÇø·Ö¶þ½øÖÆÎļþºÍÎı¾ÎļþµÄϵͳÉÏ£¨Èç + Windows£©´ò¿ªÎļþʱ£¬<function>fopen</function> º¯ÊýµÄ mode ²ÎÊýÒª¼ÓÉÏ 'b'¡£ + </para> + </warning> + <para> + <informalexample> + <programlisting role="php"> <![CDATA[ +<?php $filename = "c:\\files\\somepic.gif"; $handle = fopen($filename, "rb"); $contents = fread($handle, filesize ($filename)); fclose($handle); +?> ]]> - </programlisting> - </informalexample> - </para> - <warning> - <para> - µ±´ÓÍøÂçÁ÷»òÕ߹ܵÀ¶Áȡʱ£¬ÀýÈçÔÚ¶ÁÈ¡´Ó<link - linkend="features.remote-files">Ô¶³ÌÎļþ</link>»ò - <function>popen</function> ÒÔ¼° <function>proc_open</function> - µÄ·µ»ØÊ±£¬¶ÁÈ¡»áÔÚÒ»¸ö°ü¿ÉÓÃÖ®ºóÍ£Ö¹¡£ÕâÒâζ×ÅÄãÓ¦¸ÃÈçÏÂÀýËùʾ½«Êý¾ÝÊÕ¼¯ÆðÀ´ºÏ²¢³É´ó¿é¡£ - </para> - </warning> - <para> - <informalexample> - <programlisting role="php"> + </programlisting> + </informalexample> + </para> + <warning> + <para> + µ±´ÓÍøÂçÁ÷»òÕ߹ܵÀ¶Áȡʱ£¬ÀýÈçÔÚ¶ÁÈ¡´Ó<link + linkend="features.remote-files">Ô¶³ÌÎļþ</link>»ò + <function>popen</function> ÒÔ¼° <function>proc_open</function> + µÄ·µ»ØÊ±£¬¶ÁÈ¡»áÔÚÒ»¸ö°ü¿ÉÓÃÖ®ºóÍ£Ö¹¡£ÕâÒâζ×ÅÓ¦¸ÃÈçÏÂÀýËùʾ½«Êý¾ÝÊÕ¼¯ÆðÀ´ºÏ²¢³É´ó¿é¡£ + </para> + </warning> + <para> + <informalexample> + <programlisting role="php"> <![CDATA[ <?php $handle = fopen ("http://www.example.com/", "rb"); @@ -75,22 +78,22 @@ fclose($handle); ?> ]]> - </programlisting> - </informalexample> - </para> - <note> - <para> - Èç¹ûÄãÖ»ÊÇÏ뽫һ¸öÎļþµÄÄÚÈݶÁÈëµ½Ò»¸ö×Ö·û´®ÖУ¬Óà - <function>file_get_contents</function>£¬ËüµÄÐÔÄܱÈÉÏÃæµÄ´úÂëºÃµÃ¶à¡£ - </para> - </note> - <simpara> - ²Î¼û - <function>fwrite</function>£¬<function>fopen</function>£¬<function>fsockopen</function>£¬<function>popen</function>£¬<function>fgets</function>£¬<function>fgetss</function>£¬<function>fscanf</function>£¬<function>file</function> - ºÍ <function>fpassthru</function>¡£ - </simpara> - </refsect1> - </refentry> + </programlisting> + </informalexample> + </para> + <note> + <para> + Èç¹ûÖ»ÊÇÏ뽫һ¸öÎļþµÄÄÚÈݶÁÈëµ½Ò»¸ö×Ö·û´®ÖУ¬Óà + <function>file_get_contents</function>£¬ËüµÄÐÔÄܱÈÉÏÃæµÄ´úÂëºÃµÃ¶à¡£ + </para> + </note> + <simpara> + ²Î¼û + <function>fwrite</function>£¬<function>fopen</function>£¬<function>fsockopen</function>£¬<function>popen</function>£¬<function>fgets</function>£¬<function>fgetss</function>£¬<function>fscanf</function>£¬<function>file</function> + ºÍ <function>fpassthru</function>¡£ + </simpara> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/diff.php/phpdoc-zh/reference/filesystem/functions/fseek.xml?r1=1.5&r2=1.6&ty=u Index: phpdoc-zh/reference/filesystem/functions/fseek.xml diff -u phpdoc-zh/reference/filesystem/functions/fseek.xml:1.5 phpdoc-zh/reference/filesystem/functions/fseek.xml:1.6 --- phpdoc-zh/reference/filesystem/functions/fseek.xml:1.5 Mon Aug 15 23:17:33 2005 +++ phpdoc-zh/reference/filesystem/functions/fseek.xml Tue Sep 13 12:30:43 2005 @@ -1,48 +1,48 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.5 $ --> -<!-- $Author: lm92 $ --> +<!-- $Revision: 1.6 $ --> +<!-- $Author: dallas $ --> <!-- EN-Revision: 1.10 Maintainer: dallas Status: ready --> - <refentry id="function.fseek"> - <refnamediv> - <refname>fseek</refname> - <refpurpose>ÔÚÎļþÖ¸ÕëÖж¨Î»</refpurpose> - </refnamediv> - <refsect1> - <title>˵Ã÷</title> - <methodsynopsis> - <type>int</type><methodname>fseek</methodname> - <methodparam><type>resource</type><parameter>handle</parameter></methodparam> - <methodparam><type>int</type><parameter>offset</parameter></methodparam> - <methodparam choice="opt"><type>int</type><parameter>whence</parameter></methodparam> - </methodsynopsis> - <para> - ÔÚÓë - <parameter>handle</parameter> - ¹ØÁªµÄÎļþÖÐÉ趨ÎļþÖ¸ÕëλÖá£ÐÂλÖ㬴ÓÎļþÍ·¿ªÊ¼ÒÔ×Ö½ÚÊý¶ÈÁ¿£¬ÊÇÒÔ - <parameter>whence</parameter> - Ö¸¶¨µÄλÖüÓÉÏ - <parameter>offset</parameter>¡£<parameter>whence</parameter> - µÄÖµ¶¨ÒåΪ£º - <simplelist> - <member><constant>SEEK_SET</constant> - É趨λÖõÈÓÚ <parameter>offset</parameter> ×Ö½Ú¡£</member> - <member><constant>SEEK_CUR</constant> - É趨λÖÃΪµ±Ç°Î»ÖüÓÉÏ <parameter>offset</parameter>¡£</member> - <member><constant>SEEK_END</constant> - É趨λÖÃΪÎļþβ¼ÓÉÏ - <parameter>offset</parameter>¡££¨ÒªÒƶ¯µ½Îļþβ֮ǰµÄλÖã¬ÐèÒª¸ø - <parameter>offset</parameter> ´«µÝÒ»¸ö¸ºÖµ¡££©</member> - </simplelist> - </para> - <para> - Èç¹ûûÓÐÖ¸¶¨ - <parameter>whence</parameter>£¬Ä¬ÈÏΪ - <constant>SEEK_SET</constant>¡£ - </para> - <para> - ³É¹¦Ôò·µ»Ø 0£»·ñÔò·µ»Ø -1¡£×¢ÒâÒÆ¶¯µ½ EOF Ö®ºóµÄλÖò»Ëã´íÎó¡£ - </para> - <para> - <example> - <title><function>fseek</function> Àý×Ó</title> - <programlisting role="php"> +<refentry id="function.fseek"> + <refnamediv> + <refname>fseek</refname> + <refpurpose>ÔÚÎļþÖ¸ÕëÖж¨Î»</refpurpose> + </refnamediv> + <refsect1> + <title>˵Ã÷</title> + <methodsynopsis> + <type>int</type><methodname>fseek</methodname> + <methodparam><type>resource</type><parameter>handle</parameter></methodparam> + <methodparam><type>int</type><parameter>offset</parameter></methodparam> + <methodparam choice="opt"><type>int</type><parameter>whence</parameter></methodparam> + </methodsynopsis> + <para> + ÔÚÓë + <parameter>handle</parameter> + ¹ØÁªµÄÎļþÖÐÉ趨ÎļþÖ¸ÕëλÖá£ÐÂλÖôÓÎļþÍ·¿ªÊ¼ÒÔ×Ö½ÚÊý¶ÈÁ¿£¬ÊÇÒÔ + <parameter>whence</parameter> + Ö¸¶¨µÄλÖüÓÉÏ + <parameter>offset</parameter>¡£<parameter>whence</parameter> + µÄÖµ¶¨ÒåΪ£º + <simplelist> + <member><constant>SEEK_SET</constant> - É趨λÖõÈÓÚ <parameter>offset</parameter> ×Ö½Ú¡£</member> + <member><constant>SEEK_CUR</constant> - É趨λÖÃΪµ±Ç°Î»ÖüÓÉÏ <parameter>offset</parameter>¡£</member> + <member><constant>SEEK_END</constant> - É趨λÖÃΪÎļþβ¼ÓÉÏ + <parameter>offset</parameter>¡££¨ÒªÒƶ¯µ½Îļþβ֮ǰµÄλÖã¬ÐèÒª¸ø + <parameter>offset</parameter> ´«µÝÒ»¸ö¸ºÖµ¡££©</member> + </simplelist> + </para> + <para> + Èç¹ûûÓÐÖ¸¶¨ + <parameter>whence</parameter>£¬Ä¬ÈÏΪ + <constant>SEEK_SET</constant>¡£ + </para> + <para> + ³É¹¦Ôò·µ»Ø 0£»·ñÔò·µ»Ø -1¡£×¢ÒâÒÆ¶¯µ½ EOF Ö®ºóµÄλÖò»Ëã´íÎó¡£ + </para> + <para> + <example> + <title><function>fseek</function> Àý×Ó</title> + <programlisting role="php"> <![CDATA[ <?php @@ -57,31 +57,31 @@ ?> ]]> - </programlisting> - </example> - </para> - <para> - ¿ÉÄܲ»ÄÜÓÃÓÚÔÚ - <function>fopen</function> - ÖÐÒÔ "http://" »ò "ftp://" ¸ñʽ´ò¿ªËù·µ»ØµÄÎļþÖ¸Õë¡£ÔÚ¸½¼Óģʽ£¨¼Ó²ÎÊý "a" ´ò¿ªÎļþ£©ÖÐ - <function>ftell</function> »á·µ»ØÎ´¶¨Òå´íÎó¡£ - </para> - <note> - <para> - <parameter>whence</parameter> ²ÎÊýÊÇ PHP 4.0.0 Ö®ºóÔö¼ÓµÄ¡£ - </para> - </note> - <note> - <para> - Èç¹ûÄãʹÓø½¼ÓÄ£ÊÔ£¨"a" »ò "a+"£©£¬ÈκÎдÈëÎļþÊý¾Ý¶¼»á±»¸½¼ÓÉÏÈ¥£¬¶øÎļþµÄλÖý«»á±»ºöÂÔ¡£ - </para> - </note> - <para> - ²Î¼û <function>ftell</function> ºÍ - <function>rewind</function>¡£ - </para> - </refsect1> - </refentry> + </programlisting> + </example> + </para> + <para> + ¿ÉÄܲ»ÄÜÓÃÓÚÔÚ + <function>fopen</function> + ÖÐÒÔ "http://" »ò "ftp://" ¸ñʽ´ò¿ªËù·µ»ØµÄÎļþÖ¸Õë¡£ÔÚ¸½¼Óģʽ£¨¼Ó²ÎÊý "a" ´ò¿ªÎļþ£©ÖÐ + <function>ftell</function> »á·µ»ØÎ´¶¨Òå´íÎó¡£ + </para> + <note> + <para> + <parameter>whence</parameter> ²ÎÊýÊÇ PHP 4.0.0 Ö®ºóÔö¼ÓµÄ¡£ + </para> + </note> + <note> + <para> + Èç¹ûʹÓø½¼ÓÄ£ÊÔ£¨"a" »ò "a+"£©£¬ÈκÎдÈëÎļþÊý¾Ý¶¼»á±»¸½¼ÓÉÏÈ¥£¬¶øÎļþµÄλÖý«»á±»ºöÂÔ¡£ + </para> + </note> + <para> + ²Î¼û <function>ftell</function> ºÍ + <function>rewind</function>¡£ + </para> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/diff.php/phpdoc-zh/reference/filesystem/functions/fstat.xml?r1=1.5&r2=1.6&ty=u Index: phpdoc-zh/reference/filesystem/functions/fstat.xml diff -u phpdoc-zh/reference/filesystem/functions/fstat.xml:1.5 phpdoc-zh/reference/filesystem/functions/fstat.xml:1.6 --- phpdoc-zh/reference/filesystem/functions/fstat.xml:1.5 Mon Aug 15 23:04:34 2005 +++ phpdoc-zh/reference/filesystem/functions/fstat.xml Tue Sep 13 12:30:43 2005 @@ -1,31 +1,31 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.5 $ --> -<!-- $Author: lm92 $ --> +<!-- $Revision: 1.6 $ --> +<!-- $Author: dallas $ --> <!-- EN-Revision: 1.10 Maintainer: dallas Status: ready --> - <refentry id="function.fstat"> - <refnamediv> - <refname>fstat</refname> - <refpurpose>ͨ¹ýÒÑ´ò¿ªµÄÎļþÖ¸ÕëÈ¡µÃÎļþÐÅÏ¢</refpurpose> - </refnamediv> - <refsect1> - <title>˵Ã÷</title> - <methodsynopsis> - <type>array</type><methodname>fstat</methodname> - <methodparam><type>resource</type><parameter>handle</parameter></methodparam> - </methodsynopsis> - <para> - »ñÈ¡ÓÉÎļþÖ¸Õë <parameter>handle</parameter> - Ëù´ò¿ªÎļþµÄͳ¼ÆÐÅÏ¢¡£±¾º¯ÊýºÍ <function>stat</function> - º¯ÊýÏàËÆ£¬³ýÁËËüÊÇ×÷ÓÃÓÚÒÑ´ò¿ªµÄÎļþÖ¸Õë¶ø²»ÊÇÎļþÃû¡£ - </para> - <para> - ·µ»ØÒ»¸öÊý×é¾ßÓиÃÎļþµÄͳ¼ÆÐÅÏ¢£¬¸ÃÊý×éµÄ¸ñʽÏêϸ˵Ã÷ÓÚÊÖ²áÖÐ - <function>stat</function> Ò³ÃæÀï¡£ - </para> - <para> - <example> - <title><function>fstat</function> Àý×Ó</title> - <programlisting role="php"> +<refentry id="function.fstat"> + <refnamediv> + <refname>fstat</refname> + <refpurpose>ͨ¹ýÒÑ´ò¿ªµÄÎļþÖ¸ÕëÈ¡µÃÎļþÐÅÏ¢</refpurpose> + </refnamediv> + <refsect1> + <title>˵Ã÷</title> + <methodsynopsis> + <type>array</type><methodname>fstat</methodname> + <methodparam><type>resource</type><parameter>handle</parameter></methodparam> + </methodsynopsis> + <para> + »ñÈ¡ÓÉÎļþÖ¸Õë <parameter>handle</parameter> + Ëù´ò¿ªÎļþµÄͳ¼ÆÐÅÏ¢¡£±¾º¯ÊýºÍ <function>stat</function> + º¯ÊýÏàËÆ£¬³ýÁËËüÊÇ×÷ÓÃÓÚÒÑ´ò¿ªµÄÎļþÖ¸Õë¶ø²»ÊÇÎļþÃû¡£ + </para> + <para> + ·µ»ØÒ»¸öÊý×é¾ßÓиÃÎļþµÄͳ¼ÆÐÅÏ¢£¬¸ÃÊý×éµÄ¸ñʽÏêϸ˵Ã÷ÓÚÊÖ²áÖÐ + <function>stat</function> Ò³ÃæÀï¡£ + </para> + <para> + <example> + <title><function>fstat</function> Àý×Ó</title> + <programlisting role="php"> <![CDATA[ <?php @@ -43,9 +43,9 @@ ?> ]]> - </programlisting> - &example.outputs.similar; - <screen> + </programlisting> + &example.outputs.similar; + <screen> <![CDATA[ Array ( @@ -64,12 +64,12 @@ [blocks] => 8 ) ]]> - </screen> - </example> - </para> - ¬e.no-remote; - </refsect1> - </refentry> + </screen> + </example> + </para> + ¬e.no-remote; + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: