cvs: phpdoc-zh /reference/filesystem/functions chmod.xml chown.xml copy.xml dirname.xml disk-free-space.xml disk-total-space.xml fclose.xml feof.xml
fflush.xml fgetc.xml fgetcsv.xml fgets.xml fgetss.xml file-exists.xml file.xml fileatime.xml filectime.xml filegroup.xml fileinode.xml filemtime.xml
fileowner.xml fileperms.xml filesize.xml filetype.xml
| From: | Dallas Thunder | Date: | Mon, 24 Feb 2003 09:12:36 +0000 |
| Subject: | cvs: phpdoc-zh /reference/filesystem/functions chmod.xml chown.xml copy.xml dirname.xml disk-free-space.xml disk-total-space.xml fclose.xml feof.xml fflush.xml fgetc.xml fgetcsv.xml fgets.xml fgetss.xml file-exists.xml file.xml fileatime.xml filectime.xml filegroup.xml fileinode.xml filemtime.xml fileowner.xml fileperms.xml filesize.xml filetype.xml |
||
| Groups: | php.doc.zh | ||
| Request: | Send a blank email to doc-zh+get-1113@lists.php.net to get a copy of this message | ||
dallas Mon Feb 24 04:12:36 2003 EDT
Modified files:
/phpdoc-zh/reference/filesystem/functions chmod.xml chown.xml
copy.xml dirname.xml
disk-free-space.xml
disk-total-space.xml
fclose.xml feof.xml
fflush.xml fgetc.xml
fgetcsv.xml fgets.xml
fgetss.xml
file-exists.xml file.xml
fileatime.xml
filectime.xml
filegroup.xml
fileinode.xml
filemtime.xml
fileowner.xml
fileperms.xml
filesize.xml filetype.xml
Log:
Updated.
Index: phpdoc-zh/reference/filesystem/functions/chmod.xml diff -u phpdoc-zh/reference/filesystem/functions/chmod.xml:1.2 phpdoc-zh/reference/filesystem/functions/chmod.xml:1.3 --- phpdoc-zh/reference/filesystem/functions/chmod.xml:1.2 Sun Sep 29 22:54:17 2002 +++ phpdoc-zh/reference/filesystem/functions/chmod.xml Mon Feb 24 04:11:53 2003 @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <!-- $Author: dallas $ --> -<!-- EN-Revision: 1.3 Maintainer: dallas Status: ready --> +<!-- EN-Revision: 1.6 Maintainer: dallas Status: ready --> <refentry id="function.chmod"> <refnamediv> <refname>chmod</refname> @@ -24,16 +24,51 @@ <informalexample> <programlisting role="php"> <![CDATA[ +<?php chmod ("/somedir/somefile", 755); // Ê®½øÖÆÊý£¬¿ÉÄܲ»¶Ô chmod ("/somedir/somefile", "u+rwx,go+rx"); // ×Ö·û´®£¬²»¶Ô chmod ("/somedir/somefile", 0755); // °Ë½øÖÆÊý£¬ÕýÈ·µÄ mode Öµ +?> ]]> </programlisting> </informalexample> </para> <para> + <parameter>mode</parameter> ²ÎÊý°üº¬Èý¸ö°Ë½øÖÆÊý°´Ë³Ðò·Ö±ðÖ¸¶¨ÁËËùÓÐÕß¡¢ËùÓÐÕßËùÔÚµÄ×éÒÔ¼°ËùÓÐÈ˵ķÃÎÊÏÞÖÆ¡£Ã¿Ò»²¿·Ö¶¼¿ÉÒÔͨ¹ý¼ÓÈëËùÐèµÄȨÏÞÀ´¼ÆËã³öËùÒªµÄȨÏÞ¡£Êý×Ö 1 + ±íʾʹÎļþ¿ÉÖ´ÐУ¬Êý×Ö 2 ±íʾʹÎļþ¿Éд£¬Êý×Ö 4 + ±íʾʹÎļþ¿É¶Á¡£¼ÓÈëÕâЩÊý×ÖÀ´Öƶ¨ËùÐèÒªµÄȨÏÞ¡£ÓÐ¹Ø UNIX ϵͳµÄÎļþȨÏÞ¿ÉÒÔÔĶÁÊֲᡰman 1 + chmod¡±ºÍ¡°man 2 chmod¡±¡£ + <informalexample> + <programlisting role="php"> +<![CDATA[ +<?php +// Read and write for owner, nothing for everybody else +chmod ("/somedir/somefile", 0600); + +// Read and write for owner, read for everybody else +chmod ("/somedir/somefile", 0644); + +// Everything for owner, read and execute for others +chmod ("/somedir/somefile", 0755); + +// Everything for owner, read and execute for owner's group +chmod ("/somedir/somefile", 0750); +?> +]]> + </programlisting> + </informalexample> + </para> + <para> + <note> + <para> + µ±Ç°Óû§Ö¸µÄÊÇÖ´ÐÐ PHP µÄÓû§¡£ºÜ¿ÉÄܺÍͨ³£µÄ shell »òÕß FTP Óû§²»ÊÇͬһ¸ö¡£ + </para> + </note> + </para> + <para> &return.success; </para> + ¬e.no-remote; <para> ²Î¼û <function>chown</function> ºÍ <function>chgrp</function>¡£ </para> Index: phpdoc-zh/reference/filesystem/functions/chown.xml diff -u phpdoc-zh/reference/filesystem/functions/chown.xml:1.2 phpdoc-zh/reference/filesystem/functions/chown.xml:1.3 --- phpdoc-zh/reference/filesystem/functions/chown.xml:1.2 Sun Sep 29 22:54:17 2002 +++ phpdoc-zh/reference/filesystem/functions/chown.xml Mon Feb 24 04:12:14 2003 @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <!-- $Author: dallas $ --> -<!-- EN-Revision: 1.4 Maintainer: dallas Status: ready --> +<!-- EN-Revision: 1.5 Maintainer: dallas Status: ready --> <refentry id="function.chown"> <refnamediv> <refname>chown</refname> @@ -21,6 +21,7 @@ <para> &return.success; </para> + ¬e.no-remote; <para> ²Î¼û <function>chmod</function>¡£ </para> Index: phpdoc-zh/reference/filesystem/functions/copy.xml diff -u phpdoc-zh/reference/filesystem/functions/copy.xml:1.3 phpdoc-zh/reference/filesystem/functions/copy.xml:1.4 --- phpdoc-zh/reference/filesystem/functions/copy.xml:1.3 Sun Sep 29 22:54:17 2002 +++ phpdoc-zh/reference/filesystem/functions/copy.xml Mon Feb 24 04:12:19 2003 @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.3 $ --> +<!-- $Revision: 1.4 $ --> <!-- $Author: dallas $ --> -<!-- EN-Revision: 1.3 Maintainer: dallas Status: ready --> +<!-- EN-Revision: 1.4 Maintainer: dallas Status: ready --> <refentry id="function.copy"> <refnamediv> <refname>copy</refname> @@ -15,7 +15,7 @@ <methodparam><type>string</type><parameter>dest</parameter></methodparam> </methodsynopsis> <para> - ¿½±´Ò»¸öÎļþ¡£Èç¹û¿½±´³É¹¦Ôò·µ»Ø &true;£¬·ñÔò·µ»Ø &false;¡£ + ½«Îļþ´Ó <parameter>source</parameter> ¿½±´µ½ <parameter>dest</parameter>¡£&return.success; <example> <title><function>copy</function> Àý×Ó</title> <programlisting role="php"> Index: phpdoc-zh/reference/filesystem/functions/dirname.xml diff -u phpdoc-zh/reference/filesystem/functions/dirname.xml:1.2 phpdoc-zh/reference/filesystem/functions/dirname.xml:1.3 --- phpdoc-zh/reference/filesystem/functions/dirname.xml:1.2 Sun Sep 29 22:54:17 2002 +++ phpdoc-zh/reference/filesystem/functions/dirname.xml Mon Feb 24 04:12:20 2003 @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <!-- $Author: dallas $ --> -<!-- EN-Revision: 1.3 Maintainer: dallas Status: ready --> +<!-- EN-Revision: 1.4 Maintainer: dallas Status: ready --> <refentry id="function.dirname"> <refnamediv> <refname>dirname</refname> Index: phpdoc-zh/reference/filesystem/functions/disk-free-space.xml diff -u phpdoc-zh/reference/filesystem/functions/disk-free-space.xml:1.2 phpdoc-zh/reference/filesystem/functions/disk-free-space.xml:1.3 --- phpdoc-zh/reference/filesystem/functions/disk-free-space.xml:1.2 Sun Sep 29 22:54:17 2002 +++ phpdoc-zh/reference/filesystem/functions/disk-free-space.xml Mon Feb 24 04:12:20 2003 @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <!-- $Author: dallas $ --> -<!-- EN-Revision: 1.2 Maintainer: dallas Status: ready --> +<!-- EN-Revision: 1.3 Maintainer: dallas Status: ready --> <refentry id="function.disk-free-space"> <refnamediv> <refname>disk_free_space</refname> @@ -21,11 +21,18 @@ <title><function>disk_free_space</function> Àý×Ó</title> <programlisting role="php"> <![CDATA[ -$df = disk_free_space("/"); // $df °üº¬¸ùĿ¼Ï¿ÉÓõÄ×Ö½ÚÊý +<?php +// $df °üº¬¸ùĿ¼Ï¿ÉÓõÄ×Ö½ÚÊý +$df = disk_free_space("/"); +?> ]]> </programlisting> </example> </para> + ¬e.no-remote; + <simpara> + ²Î¼û <function>disk_total_space</function>¡£ + </simpara> </refsect1> </refentry> Index: phpdoc-zh/reference/filesystem/functions/disk-total-space.xml diff -u phpdoc-zh/reference/filesystem/functions/disk-total-space.xml:1.2 phpdoc-zh/reference/filesystem/functions/disk-total-space.xml:1.3 --- phpdoc-zh/reference/filesystem/functions/disk-total-space.xml:1.2 Sun Sep 29 22:54:17 2002 +++ phpdoc-zh/reference/filesystem/functions/disk-total-space.xml Mon Feb 24 04:12:20 2003 @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <!-- $Author: dallas $ --> -<!-- EN-Revision: 1.2 Maintainer: dallas Status: ready --> +<!-- EN-Revision: 1.3 Maintainer: dallas Status: ready --> <refentry id="function.disk-total-space"> <refnamediv> <refname>disk_total_space</refname> @@ -21,11 +21,18 @@ <title><function>disk_total_space</function> Àý×Ó</title> <programlisting role="php"> <![CDATA[ -$df = disk_total_space("/"); // $df °üº¬ "/" Ŀ¼µÄ´ÅÅÌ´óС +<?php +// $df °üº¬ "/" Ŀ¼µÄ´ÅÅÌ´óС +$df = disk_total_space("/"); +?> ]]> </programlisting> </example> </para> + ¬e.no-remote; + <simpara> + ²Î¼û <function>disk_free_space</function>¡£ + </simpara> <simpara> ¡¾ÒëÕß×¢¡¿±¾º¯Êý·µ»ØµÄÊǸÃĿ¼ËùÔڵĴÅÅÌ·ÖÇøµÄ×Ü´óС£¬Òò´ËÔÚ¸ø³öͬһ¸ö´ÅÅÌ·ÖÇøµÄ²»Í¬Ä¿Â¼×÷Ϊ²ÎÊýËùµÃµ½µÄ½á¹ûÍêÈ«Ïàͬ¡£ÔÚ UNIX ºÍ Windows 2000 Öж¼Ö§³Ö½«Ò»¸ö´ÅÅÌ·ÖÇø¼ÓÔØÎªÒ»¸ö×ÓĿ¼£¬ÕâʱÕýȷʹÓñ¾º¯Êý¾ÍºÜÓÐÒâÒå¡£ Index: phpdoc-zh/reference/filesystem/functions/fclose.xml diff -u phpdoc-zh/reference/filesystem/functions/fclose.xml:1.4 phpdoc-zh/reference/filesystem/functions/fclose.xml:1.5 --- phpdoc-zh/reference/filesystem/functions/fclose.xml:1.4 Sun Jan 12 07:05:51 2003 +++ phpdoc-zh/reference/filesystem/functions/fclose.xml Mon Feb 24 04:12:20 2003 @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.4 $ --> +<!-- $Revision: 1.5 $ --> <!-- $Author: dallas $ --> -<!-- EN-Revision: 1.4 Maintainer: dallas Status: ready --> +<!-- EN-Revision: 1.54 Maintainer: dallas Status: ready --> <refentry id="function.fclose"> <refnamediv> <refname>fclose</refname> @@ -11,10 +11,10 @@ <title>˵Ã÷</title> <methodsynopsis> <type>bool</type><methodname>fclose</methodname> - <methodparam><type>resource</type><parameter>fp</parameter></methodparam> + <methodparam><type>resource</type><parameter>handle</parameter></methodparam> </methodsynopsis> <para> - ½« <parameter>fp</parameter> Ö¸ÏòµÄÎļþ¹Ø±Õ¡£ + ½« <parameter>handle</parameter> Ö¸ÏòµÄÎļþ¹Ø±Õ¡£ </para> <para> &return.success; @@ -30,11 +30,8 @@ <programlisting role="php"> <![CDATA[ <?php - - $fp = fopen('somefile.txt', 'r'); - - fclose($fp); - + $handle = fopen('somefile.txt', 'r'); + fclose($handle); ?> ]]> </programlisting> Index: phpdoc-zh/reference/filesystem/functions/feof.xml diff -u phpdoc-zh/reference/filesystem/functions/feof.xml:1.3 phpdoc-zh/reference/filesystem/functions/feof.xml:1.4 --- phpdoc-zh/reference/filesystem/functions/feof.xml:1.3 Sun Jan 12 07:05:52 2003 +++ phpdoc-zh/reference/filesystem/functions/feof.xml Mon Feb 24 04:12:22 2003 @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.3 $ --> +<!-- $Revision: 1.4 $ --> <!-- $Author: dallas $ --> -<!-- EN-Revision: 1.3 Maintainer: dallas Status: ready --> +<!-- EN-Revision: 1.4 Maintainer: dallas Status: ready --> <refentry id="function.feof"> <refnamediv> <refname>feof</refname> @@ -11,7 +11,7 @@ <title>˵Ã÷</title> <methodsynopsis> <type>bool</type><methodname>feof</methodname> - <methodparam><type>resource</type><parameter>fp</parameter></methodparam> + <methodparam><type>resource</type><parameter>handle</parameter></methodparam> </methodsynopsis> <para> Èç¹ûÎļþÖ¸Õëµ½ÁË EOF »òÕß³ö´íʱÔò·µ»Ø &true;£¬·ñÔò·µ»Ø &false;¡£ Index: phpdoc-zh/reference/filesystem/functions/fflush.xml diff -u phpdoc-zh/reference/filesystem/functions/fflush.xml:1.3 phpdoc-zh/reference/filesystem/functions/fflush.xml:1.4 --- phpdoc-zh/reference/filesystem/functions/fflush.xml:1.3 Sun Jan 12 07:05:52 2003 +++ phpdoc-zh/reference/filesystem/functions/fflush.xml Mon Feb 24 04:12:22 2003 @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.3 $ --> +<!-- $Revision: 1.4 $ --> <!-- $Author: dallas $ --> -<!-- EN-Revision: 1.4 Maintainer: dallas Status: ready --> +<!-- EN-Revision: 1.5 Maintainer: dallas Status: ready --> <refentry id="function.fflush"> <refnamediv> <refname>fflush</refname> @@ -11,11 +11,11 @@ <title>˵Ã÷</title> <methodsynopsis> <type>bool</type><methodname>fflush</methodname> - <methodparam><type>resource</type><parameter>fp</parameter></methodparam> + <methodparam><type>resource</type><parameter>handle</parameter></methodparam> </methodsynopsis> <para> ±¾º¯ÊýÇ¿ÖÆ½«ËùÓлº³åµÄÊä³öдÈë - <parameter>fp</parameter> Îļþ¾ä±úËùÖ¸ÏòµÄ×ÊÔ´¡£³É¹¦·µ»Ø &true;£¬·ñÔò·µ»Ø &false;¡£ + <parameter>handle</parameter> Îļþ¾ä±úËùÖ¸ÏòµÄ×ÊÔ´¡£³É¹¦·µ»Ø &true;£¬·ñÔò·µ»Ø &false;¡£ </para> <para> ÎļþÖ¸Õë±ØÐëÓÐЧ£¬²¢ÇÒÊÇͨ¹ý Index: phpdoc-zh/reference/filesystem/functions/fgetc.xml diff -u phpdoc-zh/reference/filesystem/functions/fgetc.xml:1.3 phpdoc-zh/reference/filesystem/functions/fgetc.xml:1.4 --- phpdoc-zh/reference/filesystem/functions/fgetc.xml:1.3 Sun Jan 12 07:05:52 2003 +++ phpdoc-zh/reference/filesystem/functions/fgetc.xml Mon Feb 24 04:12:24 2003 @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.3 $ --> +<!-- $Revision: 1.4 $ --> <!-- $Author: dallas $ --> -<!-- EN-Revision: 1.3 Maintainer: dallas Status: ready --> +<!-- EN-Revision: 1.8 Maintainer: dallas Status: ready --> <refentry id="function.fgetc"> <refnamediv> <refname>fgetc</refname> @@ -11,15 +11,23 @@ <title>˵Ã÷</title> <methodsynopsis> <type>string</type><methodname>fgetc</methodname> - <methodparam><type>resource</type><parameter>fp</parameter></methodparam> + <methodparam><type>resource</type><parameter>handle</parameter></methodparam> </methodsynopsis> <para> - ·µ»ØÒ»¸ö°üº¬ÓÐÒ»¸ö×Ö·ûµÄ×Ö·û´®£¬¸Ã×Ö·û´Ó fp Ö¸ÏòµÄÎļþÖеõ½¡£Åöµ½ EOF Ôò·µ»Ø &false;¡£ + ·µ»ØÒ»¸ö°üº¬ÓÐÒ»¸ö×Ö·ûµÄ×Ö·û´®£¬¸Ã×Ö·û´Ó <parameter>handle</parameter> + Ö¸ÏòµÄÎļþÖеõ½¡£Åöµ½ EOF Ôò·µ»Ø &false;¡£ </para> <para> ÎļþÖ¸Õë±ØÐëÓÐЧ£¬²¢ÇÒÊÇͨ¹ý <function>fopen</function>£¬<function>popen</function> »ò <function>fsockopen</function> ³É¹¦´ò¿ªµÄ¡£ + </para> + <para> + <note> + <para> + ±¾º¯Êý¿É°²È«ÓÃÓÚ¶þ½øÖÆÎļþ¡£ + </para> + </note> </para> <para> ²Î¼û <function>fread</function>£¬<function>fopen</function>£¬<function>popen</function>£¬<function>fsockopen</function> Index: phpdoc-zh/reference/filesystem/functions/fgetcsv.xml diff -u phpdoc-zh/reference/filesystem/functions/fgetcsv.xml:1.2 phpdoc-zh/reference/filesystem/functions/fgetcsv.xml:1.3 --- phpdoc-zh/reference/filesystem/functions/fgetcsv.xml:1.2 Sun Sep 29 22:54:17 2002 +++ phpdoc-zh/reference/filesystem/functions/fgetcsv.xml Mon Feb 24 04:12:25 2003 @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <!-- $Author: dallas $ --> -<!-- EN-Revision: 1.4 Maintainer: dallas Status: ready --> +<!-- EN-Revision: 1.7 Maintainer: dallas Status: ready --> <refentry id="function.fgetcsv"> <refnamediv> <refname>fgetcsv</refname> @@ -11,7 +11,7 @@ <title>˵Ã÷</title> <methodsynopsis> <type>array</type><methodname>fgetcsv</methodname> - <methodparam><type>int</type><parameter>fp</parameter></methodparam> + <methodparam><type>int</type><parameter>handle</parameter></methodparam> <methodparam><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> @@ -19,11 +19,18 @@ <simpara> ºÍ <function>fgets</function> ÀàËÆ£¬Ö»³ýÁË <function>fgetcsv</function> ½âÎö¶ÁÈëµÄÐв¢ÕÒ³ö <acronym>CSV</acronym> - ¸ñʽµÄ×Ö¶ÎÈ»ºó·µ»ØÒ»¸ö°üº¬ÕâЩ×ֶεÄÊý×é¡£×ֶηָô·ûÊǶººÅ£¬»òÕßÓÿÉÑ¡µÄµÚÈý¸ö²ÎÊýÁíÍâÖ¸¶¨¡£×Ö¶ÎÓÃË«ÒýºÅ°üΧ£¬»òÕßÓÿÉÑ¡µÄµÚËĸö²ÎÊýÁíÍâÖ¸¶¨¡£<parameter>Delimiter</parameter> - ºÍ <parameter>enclosure</parameter> ²»ÄÜÊÇ null ²¢ÇÒÖ»ÓеÚÒ»¸ö×Ö·ûÓÐЧ¡£ + ¸ñʽµÄ×Ö¶ÎÈ»ºó·µ»ØÒ»¸ö°üº¬ÕâЩ×ֶεÄÊý×é¡£¿ÉÑ¡µÄµÚÈý¸ö²ÎÊý + <parameter>delimiter</parameter> µÄĬÈÏÖµÊǶººÅ¡£¿ÉÑ¡²ÎÊý <parameter>enclosure</parameter> + ²»ÄÜÊÇ <type>null</type> ²¢ÇÒ±»ÏÞÖÆÎªÒ»¸ö×Ö·û¡£Èç¹û <parameter>enclosure</parameter> + ¶àÓÚÒ»¸ö×Ö·û£¬ÔòÖ»ÓеÚÒ»¸ö×Ö·ûÓÐЧ¡£ </simpara> + <note> + <simpara> + <parameter>enclosure</parameter> ²ÎÊýÊÇ PHP 4.3.0 мӵġ£ + </simpara> + </note> <simpara> - <parameter>fp</parameter> ±ØÐëÊÇͨ¹ý + <parameter>handle</parameter> ±ØÐëÊÇͨ¹ý <function>fopen</function>£¬<function>popen</function> »òÕß <function>fsockopen</function> ³É¹¦´ò¿ªµÄÓÐЧÎļþÖ¸Õë¡£ </simpara> @@ -35,32 +42,31 @@ </simpara> <note> <simpara> - CSV ÎļþÖеĿÕÐн«±»·µ»ØÎªÒ»¸ö°üº¬Óе¥¸ö &null; ×ֶεÄÊý×飬²»»á±»µ±³É´íÎó¡£ - </simpara> - <simpara> - <parameter>enclosure</parameter> ÊÇ PHP 4.3.0 мӵġ£ + CSV ÎļþÖеĿÕÐн«±»·µ»ØÎªÒ»¸ö°üº¬Óе¥¸ö <type>null</type> ×ֶεÄÊý×飬²»»á±»µ±³É´íÎó¡£ </simpara> </note> - <example> - <title> - <function>fgetcsv</function> Àý×Ó - ¶ÁÈ¡²¢ÏÔʾ CSV ÎļþµÄÕû¸öÄÚÈÝ - </title> - <programlisting role="php"> + <para> + <example> + <title>¶ÁÈ¡²¢ÏÔʾ CSV ÎļþµÄÕû¸öÄÚÈÝ</title> + <programlisting role="php"> <![CDATA[ +<?php $row = 1; -$fp = fopen ("test.csv","r"); -while ($data = fgetcsv ($fp, 1000, ",")) { +$handle = fopen ("test.csv","r"); +while ($data = fgetcsv ($handle, 1000, ",")) { $num = count ($data); - print "<p> $num fields in line $row: <br>"; + print "<p> $num fields in line $row: <br>\n"; $row++; for ($c=0; $c < $num; $c++) { - print $data[$c] . "<br>"; + print $data[$c] . "<br>\n"; } } -fclose ($fp); +fclose ($handle); +?> ]]> - </programlisting> - </example> + </programlisting> + </example> + </para> </refsect1> </refentry> Index: phpdoc-zh/reference/filesystem/functions/fgets.xml diff -u phpdoc-zh/reference/filesystem/functions/fgets.xml:1.3 phpdoc-zh/reference/filesystem/functions/fgets.xml:1.4 --- phpdoc-zh/reference/filesystem/functions/fgets.xml:1.3 Sun Sep 29 22:54:17 2002 +++ phpdoc-zh/reference/filesystem/functions/fgets.xml Mon Feb 24 04:12:26 2003 @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.3 $ --> +<!-- $Revision: 1.4 $ --> <!-- $Author: dallas $ --> -<!-- EN-Revision: 1.3 Maintainer: dallas Status: ready --> +<!-- EN-Revision: 1.7 Maintainer: dallas Status: ready --> <refentry id="function.fgets"> <refnamediv> <refname>fgets</refname> @@ -11,11 +11,11 @@ <title>˵Ã÷</title> <methodsynopsis> <type>string</type><methodname>fgets</methodname> - <methodparam><type>int</type><parameter>fp</parameter></methodparam> + <methodparam><type>int</type><parameter>handle</parameter></methodparam> <methodparam choice="opt"><type>int</type><parameter>length</parameter></methodparam> </methodsynopsis> <para> - ´Ó fp Ö¸ÏòµÄÎļþÖжÁȡһÐв¢·µ»Ø³¤¶È×î¶àΪ length - 1 + ´Ó <parameter>handle</parameter> Ö¸ÏòµÄÎļþÖжÁȡһÐв¢·µ»Ø³¤¶È×î¶àΪ length - 1 ×Ö½ÚµÄ×Ö·û´®¡£Åöµ½»»Ðзû£¨°üÀ¨ÔÚ·µ»ØÖµÖУ©¡¢EOF »òÕßÒѾ¶ÁÈ¡ÁË length - 1 ×Ö½ÚºóÍ£Ö¹£¨¿´ÏÈÅöµ½ÄÇÒ»ÖÖÇé¿ö£©¡£Èç¹ûûÓÐÖ¸¶¨ length£¬ÔòĬÈÏΪ 1K£¬»òÕß˵ 1024 ×Ö½Ú¡£ </para> @@ -40,19 +40,27 @@ <title>ÖðÐжÁÈ¡Îļþ</title> <programlisting role="php"> <![CDATA[ -$fd = fopen ("/tmp/inputfile.txt", "r"); -while (!feof ($fd)) { +$handle = fopen ("/tmp/inputfile.txt", "r"); +while (!feof ($handle)) { $buffer = fgets($fd, 4096); echo $buffer; } -fclose ($fd); +fclose ($handle); ]]> </programlisting> </example> </para> <note> <simpara> - <parameter>length</parameter> ²ÎÊý´Ó PHP 4.2.0 Æð³ÉΪ¿ÉÑ¡Ïî¡£ + <parameter>length</parameter> ²ÎÊý´Ó PHP 4.2.0 + Æð³ÉΪ¿ÉÑ¡ÏÈç¹ûºöÂÔ£¬ÔòÐеij¤¶È±»¼Ù¶¨Îª 1024¡£´Ó PHP 4.3 ¿ªÊ¼£¬ºöÂÔµô + <parameter>length</parameter> ½«¼ÌÐø´ÓÁ÷ÖжÁÈ¡Êý¾ÝÖ±µ½ÐнáÊø¡£Èç¹ûÎļþÖеĴó¶àÊýÐж¼´óÓÚ + 8KB£¬ÔòÔڽű¾ÖÐÖ¸¶¨×î´óÐеij¤¶ÈÔÚÀûÓÃ×ÊÔ´ÉϸüΪÓÐЧ¡£ + </simpara> + </note> + <note> + <simpara> + ´Ó PHP 4.3 ¿ªÊ¼±¾º¯Êý¿ÉÒÔ°²È«ÓÃÓÚ¶þ½øÖÆÎļþ¡£ÔçÆÚµÄ°æ±¾Ôò²»ÐС£ </simpara> </note> ¬e.line-endings; Index: phpdoc-zh/reference/filesystem/functions/fgetss.xml diff -u phpdoc-zh/reference/filesystem/functions/fgetss.xml:1.4 phpdoc-zh/reference/filesystem/functions/fgetss.xml:1.5 --- phpdoc-zh/reference/filesystem/functions/fgetss.xml:1.4 Sun Jan 12 07:18:22 2003 +++ phpdoc-zh/reference/filesystem/functions/fgetss.xml Mon Feb 24 04:12:26 2003 @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.4 $ --> +<!-- $Revision: 1.5 $ --> <!-- $Author: dallas $ --> -<!-- EN-Revision: 1.4 Maintainer: dallas Status: ready --> +<!-- EN-Revision: 1.5 Maintainer: dallas Status: ready --> <refentry id="function.fgetss"> <refnamediv> <refname>fgetss</refname> @@ -11,7 +11,7 @@ <title>˵Ã÷</title> <methodsynopsis> <type>string</type><methodname>fgetss</methodname> - <methodparam><type>resource</type><parameter>fp</parameter></methodparam> + <methodparam><type>resource</type><parameter>handle</parameter></methodparam> <methodparam><type>int</type><parameter>length</parameter></methodparam> <methodparam choice="opt"><type>string</type><parameter>allowable_tags</parameter></methodparam> </methodsynopsis> Index: phpdoc-zh/reference/filesystem/functions/file-exists.xml diff -u phpdoc-zh/reference/filesystem/functions/file-exists.xml:1.3 phpdoc-zh/reference/filesystem/functions/file-exists.xml:1.4 --- phpdoc-zh/reference/filesystem/functions/file-exists.xml:1.3 Tue Oct 22 01:41:18 2002 +++ phpdoc-zh/reference/filesystem/functions/file-exists.xml Mon Feb 24 04:12:26 2003 @@ -1,11 +1,11 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.3 $ --> -<!-- $Author: yincheng $ --> -<!-- EN-Revision: 1.4 Maintainer: dallas Status: ready --> +<!-- $Revision: 1.4 $ --> +<!-- $Author: dallas $ --> +<!-- EN-Revision: 1.7 Maintainer: dallas Status: ready --> <refentry id="function.file-exists"> <refnamediv> <refname>file_exists</refname> - <refpurpose>¼ì²éÎļþÊÇ·ñ´æÔÚ</refpurpose> + <refpurpose>¼ì²éÎļþ»òĿ¼ÊÇ·ñ´æÔÚ</refpurpose> </refnamediv> <refsect1> <title>˵Ã÷</title> @@ -14,17 +14,9 @@ <methodparam><type>string</type><parameter>filename</parameter></methodparam> </methodsynopsis> <simpara> - Èç¹ûÓÉ <parameter>filename</parameter> Ö¸¶¨µÄÎļþ´æÔÚÔò·µ»Ø + Èç¹ûÓÉ <parameter>filename</parameter> Ö¸¶¨µÄÎļþ»òĿ¼´æÔÚÔò·µ»Ø &true;£¬·ñÔò·µ»Ø &false;¡£ </simpara> - <simpara> - ±¾º¯Êý²»ÄÜÓÃÓÚ<link - linkend="features.remote-files">Ô¶³ÌÎļþ</link>£¬±»¼ì²éµÄÎļþ±ØÐëͨ¹ý·þÎñÆ÷µÄÎļþϵͳÀ´·ÃÎÊ¡£ - </simpara> - <simpara> - ±¾º¯ÊýµÄ·µ»Ø½á¹û»á±»»º´æ¡£¸ü¶àÏêϸ×ÊÁϼû - <function>clearstatcache</function>¡£ - </simpara> <note> <title>ʹÓà Windows ¹²Ïí</title> <para> @@ -50,8 +42,13 @@ </programlisting> </example> </para> + + ¬e.clearstatcache; + + ¬e.no-remote; + <para> -²Î¼û <function>is_readable</function>£¬<function>is_writable</function>£¬<function>is_file</function> ºÍ <function>file</function>¡£ + ²Î¼û <function>is_readable</function>£¬<function>is_writable</function>£¬<function>is_file</function> ºÍ <function>file</function>¡£ </para> </refsect1> </refentry> Index: phpdoc-zh/reference/filesystem/functions/file.xml diff -u phpdoc-zh/reference/filesystem/functions/file.xml:1.3 phpdoc-zh/reference/filesystem/functions/file.xml:1.4 --- phpdoc-zh/reference/filesystem/functions/file.xml:1.3 Sun Sep 29 22:55:19 2002 +++ phpdoc-zh/reference/filesystem/functions/file.xml Mon Feb 24 04:12:26 2003 @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.3 $ --> +<!-- $Revision: 1.4 $ --> <!-- $Author: dallas $ --> -<!-- EN-Revision: 1.3 Maintainer: dallas Status: ready --> +<!-- EN-Revision: 1.7 Maintainer: dallas Status: ready --> <refentry id="function.file"> <refnamediv> <refname>file</refname> @@ -15,8 +15,9 @@ <methodparam choice="opt"><type>int</type><parameter>use_include_path</parameter></methodparam> </methodsynopsis> <para> - ºÍ <function>readfile</function> Ò»Ñù£¬Ö»³ýÁË - <function>file</function> ½«Îļþ×÷Ϊһ¸öÊý×é·µ»Ø¡£Êý×éÖеÄÿ¸öµ¥Ôª¶¼ÊÇÎļþÖÐÏàÓ¦µÄÒ»ÐУ¬°üÀ¨»»ÐзûÔÚÄÚ¡£ + ºÍ <function>readfile</function> Ò»Ñù£¬Ö»³ýÁË <function>file</function> + ½«Îļþ×÷Ϊһ¸öÊý×é·µ»Ø¡£Êý×éÖеÄÿ¸öµ¥Ôª¶¼ÊÇÎļþÖÐÏàÓ¦µÄÒ»ÐУ¬°üÀ¨»»ÐзûÔÚÄÚ¡£Èç¹ûʧ°Ü + <function>file</function> ·µ»Ø &false;¡£ </para> <note> <para> @@ -26,22 +27,22 @@ </note> ¬e.line-endings; <para> - ¿ÉÒÔ½«¿ÉÑ¡µÄµÚ¶þ¸ö²ÎÊýÉèΪ "1"£¬Èç¹ûÒ²ÏëÔÚ <link - linkend="ini.include-path">include_path</link> ÖÐËÑѰÎļþµÄ»°¡£ + Èç¹ûÒ²ÏëÔÚ <link linkend="ini.include-path">include_path</link> + ÖÐËÑѰÎļþµÄ»°£¬¿ÉÒÔ½«¿ÉÑ¡²ÎÊý <parameter>use_include_path</parameter> ÉèΪ "1"¡£ </para> <para> <informalexample> <programlisting role="php"> <![CDATA[ <?php -// ½«Ò»¸ö web Ò³Ãæ¶ÁÈëµ½Ò»¸öÊý×éÖв¢Êä³ö -$fcontents = file ('http://www.example.com/'); -while (list ($line_num, $line) = each ($fcontents)) { - echo "<b>Line $line_num:</b>; ", htmlspecialchars ($line), "<br>\n"; +// ½«Ò»¸öÎļþ¶ÁÈëÊý×é¡£±¾ÀýÖÐͨ¹ý HTTP ´Ó URL ÖÐÈ¡µÃ HTML Ô´Îļþ¡£ +$lines = file ('http://www.example.com/'); +// ÔÚÊý×éÖÐÑ»·£¬ÏÔʾ html µÄÔ´Îļþ²¢¼ÓÉÏÐкš£ +foreach ($lines as $line_num => $line) { + echo "Line #<b>{$line_num}</b> : " . htmlspecialchars($line) . "<br>\n"; } - -// ½«Ò»¸ö web Ò³Ãæ¶ÁÈëµ½Ò»¸ö×Ö·û´® -$fcontents = implode ('', file ('http://www.example.com/')); +// ÁíÒ»¸öÀý×Ó½« web Ò³Ãæ¶ÁÈë×Ö·û´®¡£²Î¼û file_get_contents()¡£ +$html = implode ('', file ('http://www.example.com/')); ?> ]]> </programlisting> @@ -50,14 +51,16 @@ <note> <para> ´Ó PHP 4.3.0 ¿ªÊ¼¿ÉÒÔÓà <function>file_get_contents</function> - À´½«Îļþ¶ÁÈëµ½Ò»¸ö×Ö·û´®·µ»Ø£¬¶þ½øÖÆÎļþÒ²¿ÉÒÔ¡£ + À´½«Îļþ¶ÁÈëµ½Ò»¸ö×Ö·û´®·µ»Ø¡£ + </para> + <para> + ´Ó PHP 4.3.0 ¿ªÊ¼ <function>file</function> ¿ÉÒÔ°²È«ÓÃÓÚ¶þ½øÖÆÎļþ¡£ </para> </note> - ¬e.not-bin-safe; &tip.fopen-wrapper; <para> - ²Î¼û <function>readfile</function>£¬<function>fopen</function>£¬<function>fsockopen</function> - ºÍ <function>popen</function>¡£ + ²Î¼û <function>readfile</function>£¬<function>fopen</function>£¬<function>fsockopen</function>£¬<function>popen</function>£¬<function>file_get_contents</function> + ºÍ <function>include</function>¡£ </para> </refsect1> </refentry> Index: phpdoc-zh/reference/filesystem/functions/fileatime.xml diff -u phpdoc-zh/reference/filesystem/functions/fileatime.xml:1.2 phpdoc-zh/reference/filesystem/functions/fileatime.xml:1.3 --- phpdoc-zh/reference/filesystem/functions/fileatime.xml:1.2 Sun Sep 29 22:55:19 2002 +++ phpdoc-zh/reference/filesystem/functions/fileatime.xml Mon Feb 24 04:12:27 2003 @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <!-- $Author: dallas $ --> -<!-- EN-Revision: 1.2 Maintainer: dallas Status: ready --> +<!-- EN-Revision: 1.3 Maintainer: dallas Status: ready --> <refentry id="function.fileatime"> <refnamediv> <refname>fileatime</refname> @@ -17,17 +17,18 @@ ·µ»ØÎļþÉϴα»·ÃÎʵÄʱ¼ä£¬Èç¹û³ö´íÔò·µ»Ø &false;¡£Ê±¼äÒÔ Unix ʱ¼ä´ÁµÄ·½Ê½·µ»Ø¡£ </simpara> <simpara> - ±¾º¯ÊýµÄ½á¹û»á±»»º´æ¡£ÏêϸÐÅÏ¢¼û <function>clearstatcache</function>¡£ - </simpara> - <simpara> ×¢Ò⣺һ¸öÎļþµÄ atime Ó¦¸ÃÔÚ²»ÂÛºÎʱ¶ÁÈ¡ÁË´ËÎļþÖеÄÊý¾Ý¿éʱ±»¸ü¸Ä¡£µ±Ò»¸öÓ¦ÓóÌÐò¶¨ÆÚ·ÃÎÊ´óÁ¿Îļþ»òĿ¼ʱºÜÓ°ÏìÐÔÄÜ¡£ÓÐЩ Unix Îļþϵͳ¿ÉÒÔÔÚ¼ÓÔØÊ±¹Ø±Õ atime µÄ¸üÐÂÒÔÌá¸ßÕâÀà³ÌÐòµÄÐÔÄÜ¡£USENET ÐÂÎÅ×é¼ÙÍÑ»úÊÇÒ»¸ö³£¼ûµÄÀý×Ó¡£ÔÚÕâÖÖÎļþϵͳϱ¾º¯ÊýûÓÐÓô¦¡£ </simpara> + + ¬e.clearstatcache; + + ¬e.no-remote; + <simpara> - ±¾º¯Êý²»ÄÜÓÃÓÚ<link - linkend="features.remote-files">Ô¶³ÌÎļþ</link>£¬±»¼ì²éµÄÎļþ±ØÐëͨ¹ý·þÎñÆ÷µÄÎļþϵͳÀ´·ÃÎÊ¡£ + ²Î¼û <function>filemtime</function>£¬<function>fileinode</function> ºÍ <function>date</function>¡£ </simpara> </refsect1> </refentry> Index: phpdoc-zh/reference/filesystem/functions/filectime.xml diff -u phpdoc-zh/reference/filesystem/functions/filectime.xml:1.2 phpdoc-zh/reference/filesystem/functions/filectime.xml:1.3 --- phpdoc-zh/reference/filesystem/functions/filectime.xml:1.2 Sun Sep 29 22:55:19 2002 +++ phpdoc-zh/reference/filesystem/functions/filectime.xml Mon Feb 24 04:12:27 2003 @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <!-- $Author: dallas $ --> -<!-- EN-Revision: 1.2 Maintainer: dallas Status: ready --> +<!-- EN-Revision: 1.3 Maintainer: dallas Status: ready --> <refentry id="function.filectime"> <refnamediv> <refname>filectime</refname> @@ -17,9 +17,6 @@ ·µ»ØÎļþÉÏ´Î inode ±»Ð޸ĵÄʱ¼ä£¬Èç¹û³ö´íÔò·µ»Ø &false;¡£Ê±¼äÒÔ Unix ʱ¼ä´ÁµÄ·½Ê½·µ»Ø¡£ </para> <para> - ±¾º¯ÊýµÄ½á¹û»á±»»º´æ¡£ÏêϸÐÅÏ¢¼û <function>clearstatcache</function>¡£ - </para> - <para> ×¢Ò⣺ÔÚ´ó¶àÊý Unix ÎļþϵͳÖУ¬µ±Ò»¸öÎļþµÄ inode Êý¾Ý±»¸Ä±äʱÔò¸ÃÎļþ±»ÈÏΪÊÇÐÞ¸ÄÁË¡£Ò²¾ÍÊÇ˵£¬µ±ÎļþµÄȨÏÞ£¬ËùÓÐÕߣ¬ËùÓÐ×é»òÆäËü inode ÖеÄÔªÊý¾Ý±»¸üÐÂʱ¡£²Î¼û @@ -30,9 +27,13 @@ ×¢ÒâijЩ Unix ˵Ã÷Îı¾ÖÐ°Ñ ctime ˵³ÉÊǸÃÎļþ½¨Á¢µÄʱ¼ä£¬ÕâÊÇ´íµÄ¡£ÔÚ´ó¶àÊý Unix ÎļþϵͳÖÐûÓÐ Unix ÎļþµÄ½¨Á¢Ê±¼ä¡£ </para> + + ¬e.clearstatcache; + + ¬e.no-remote; + <simpara> - ±¾º¯Êý²»ÄÜÓÃÓÚ<link - linkend="features.remote-files">Ô¶³ÌÎļþ</link>£¬±»¼ì²éµÄÎļþ±ØÐëͨ¹ý·þÎñÆ÷µÄÎļþϵͳÀ´·ÃÎÊ¡£ + ²Î¼û <function>filemtime</function>¡£ </simpara> </refsect1> </refentry> Index: phpdoc-zh/reference/filesystem/functions/filegroup.xml diff -u phpdoc-zh/reference/filesystem/functions/filegroup.xml:1.2 phpdoc-zh/reference/filesystem/functions/filegroup.xml:1.3 --- phpdoc-zh/reference/filesystem/functions/filegroup.xml:1.2 Sat Sep 28 18:31:19 2002 +++ phpdoc-zh/reference/filesystem/functions/filegroup.xml Mon Feb 24 04:12:28 2003 @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <!-- $Author: dallas $ --> -<!-- EN-Revision: 1.4 Maintainer: dallas Status: ready --> +<!-- EN-Revision: 1.5 Maintainer: dallas Status: ready --> <refentry id="function.filegroup"> <refnamediv> <refname>filegroup</refname> @@ -16,17 +16,17 @@ <para> È¡µÃ¸ÃÎļþËùÊô×éµÄ ID¡£Èç¹û³ö´íÔò·µ»Ø &false;¡£×é ID ÒÔÊý×Ö¸ñʽ·µ»Ø£¬Óà - <function>posix_getgrgid</function> À´½«Æä½âÎöΪ×éÃû¡£ + <function>posix_getgrgid</function> À´½«Æä½âÎöΪ×éÃû¡£Èç¹ûʧ°Ü·µ»Ø + &false; ÒÔ¼°Ò»¸ö <constant>E_WARNING</constant> ¼¶±ðµÄ´íÎó¡£ </para> <para> ±¾º¯ÊýµÄ½á¹û»á±»»º´æ¡£ÏêϸÐÅÏ¢¼û <function>clearstatcache</function>¡£ </para> - <note> - <simpara> - ±¾º¯Êý²»ÄÜÓÃÓÚ<link - linkend="features.remote-files">Ô¶³ÌÎļþ</link>£¬±»¼ì²éµÄÎļþ±ØÐëͨ¹ý·þÎñÆ÷µÄÎļþϵͳÀ´·ÃÎÊ¡£ - </simpara> - </note> + ¬e.clearstatcache; + ¬e.no-remote; + <simpara> + ²Î¼û <function>fileowner</function> ºÍ <link linkend="ini.safe-mode-gid">safe_mode_gid</link>¡£ + </simpara> </refsect1> </refentry> Index: phpdoc-zh/reference/filesystem/functions/fileinode.xml diff -u phpdoc-zh/reference/filesystem/functions/fileinode.xml:1.2 phpdoc-zh/reference/filesystem/functions/fileinode.xml:1.3 --- phpdoc-zh/reference/filesystem/functions/fileinode.xml:1.2 Sun Sep 29 22:55:19 2002 +++ phpdoc-zh/reference/filesystem/functions/fileinode.xml Mon Feb 24 04:12:28 2003 @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <!-- $Author: dallas $ --> -<!-- EN-Revision: 1.3 Maintainer: dallas Status: ready --> +<!-- EN-Revision: 1.4 Maintainer: dallas Status: ready --> <refentry id="function.fileinode"> <refnamediv> <refname>fileinode</refname> @@ -16,12 +16,10 @@ <para> ·µ»ØÎļþµÄ inode ½ÚµãºÅ£¬³ö´íʱ·µ»Ø &false;¡£ </para> - <para> - ±¾º¯ÊýµÄ½á¹û»á±»»º´æ¡£ÏêϸÐÅÏ¢¼û <function>clearstatcache</function>¡£ - </para> + ¬e.clearstatcache; + ¬e.no-remote; <simpara> - ±¾º¯Êý²»ÄÜÓÃÓÚ<link - linkend="features.remote-files">Ô¶³ÌÎļþ</link>£¬±»¼ì²éµÄÎļþ±ØÐëͨ¹ý·þÎñÆ÷µÄÎļþϵͳÀ´·ÃÎÊ¡£ + ²Î¼û <function>stat</function>¡£ </simpara> </refsect1> </refentry> Index: phpdoc-zh/reference/filesystem/functions/filemtime.xml diff -u phpdoc-zh/reference/filesystem/functions/filemtime.xml:1.2 phpdoc-zh/reference/filesystem/functions/filemtime.xml:1.3 --- phpdoc-zh/reference/filesystem/functions/filemtime.xml:1.2 Sun Sep 29 22:55:19 2002 +++ phpdoc-zh/reference/filesystem/functions/filemtime.xml Mon Feb 24 04:12:29 2003 @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <!-- $Author: dallas $ --> -<!-- EN-Revision: 1.2 Maintainer: dallas Status: ready --> +<!-- EN-Revision: 1.4 Maintainer: dallas Status: ready --> <refentry id="function.filemtime"> <refnamediv> <refname>filemtime</refname> @@ -14,21 +14,34 @@ <methodparam><type>string</type><parameter>filename</parameter></methodparam> </methodsynopsis> <para> - ·µ»ØÎļþÉϴα»Ð޸ĵÄʱ¼ä£¬³ö´íʱ·µ»Ø &false;¡£Ê±¼äÒÔ Unix ʱ¼ä´ÁµÄ·½Ê½·µ»Ø¡£ + ·µ»ØÎļþÉϴα»Ð޸ĵÄʱ¼ä£¬³ö´íʱ·µ»Ø &false;¡£Ê±¼äÒÔ Unix ʱ¼ä´ÁµÄ·½Ê½·µ»Ø£¬¿ÉÓÃÓÚ + <function>date</function>¡£ </para> + ¬e.clearstatcache; + ¬e.no-remote; <para> - ±¾º¯ÊýµÄ½á¹û»á±»»º´æ¡£ÏêϸÐÅÏ¢¼û <function>clearstatcache</function>¡£ + ±¾º¯Êý·µ»ØÎļþÖеÄÊý¾Ý¿éÉϴα»Ð´ÈëµÄʱ¼ä£¬Ò²¾ÍÊÇ˵£¬ÎļþµÄÄÚÈÝÉϴα»Ð޸ĵÄʱ¼ä¡£ </para> - <simpara> - ±¾º¯Êý²»ÄÜÓÃÓÚ<link - linkend="features.remote-files">Ô¶³ÌÎļþ</link>£¬±»¼ì²éµÄÎļþ±ØÐëͨ¹ý·þÎñÆ÷µÄÎļþϵͳÀ´·ÃÎÊ¡£ - </simpara> <para> - ×¢Ò⣺±¾º¯Êý·µ»ØÎļþÖеÄÊý¾Ý¿éÉϴα»Ð´ÈëµÄʱ¼ä£¬Ò²¾ÍÊÇ˵£¬ÎļþµÄÄÚÈÝÉϴα»Ð޸ĵÄʱ¼ä¡£¶Ô±¾º¯ÊýµÄ½á¹ûʹÓà - <function>date</function> º¯ÊýÀ´µÃµ½¿É¶ÁµÄÐÞ¸Äʱ¼äÓÃÓÚÒ³ÃæµÄ½Å×¢¡£ + <example> + <title><function>filemtime</function> Àý×Ó</title> + <programlisting role="php"> +<![CDATA[ +<?php +// outputs e.g. somefile.txt was last modified: December 29 2002 22:16:23. +$filename = 'somefile.txt'; +if (file_exists($filename)) { + echo "$filename was last modified: " . date ("F d Y H:i:s.", filemtime($filename)); + +} +?> +]]> + </programlisting> + </example> </para> <para> - ²Î¼û <function>filectime</function> ºÍ <function>touch</function>¡£ + ²Î¼û <function>filectime</function>£¬<function>stat</function>£¬<function>touch</function> + ºÍ <function>getlastmod</function>¡£ </para> </refsect1> </refentry> Index: phpdoc-zh/reference/filesystem/functions/fileowner.xml diff -u phpdoc-zh/reference/filesystem/functions/fileowner.xml:1.2 phpdoc-zh/reference/filesystem/functions/fileowner.xml:1.3 --- phpdoc-zh/reference/filesystem/functions/fileowner.xml:1.2 Sun Sep 29 22:55:19 2002 +++ phpdoc-zh/reference/filesystem/functions/fileowner.xml Mon Feb 24 04:12:29 2003 @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <!-- $Author: dallas $ --> -<!-- EN-Revision: 1.3 Maintainer: dallas Status: ready --> +<!-- EN-Revision: 1.4 Maintainer: dallas Status: ready --> <refentry id="function.fileowner"> <refnamediv> <refname>fileowner</refname> @@ -18,12 +18,10 @@ ID ÒÔÊý×Ö¸ñʽ·µ»Ø£¬Óà <function>posix_getpwuid</function> À´½«Æä½âÎöΪÓû§Ãû¡£ </para> - <para> - ±¾º¯ÊýµÄ½á¹û»á±»»º´æ¡£ÏêϸÐÅÏ¢¼û <function>clearstatcache</function>¡£ - </para> + ¬e.clearstatcache; + ¬e.no-remote; <simpara> - ±¾º¯Êý²»ÄÜÓÃÓÚ<link - linkend="features.remote-files">Ô¶³ÌÎļþ</link>£¬±»¼ì²éµÄÎļþ±ØÐëͨ¹ý·þÎñÆ÷µÄÎļþϵͳÀ´·ÃÎÊ¡£ + ²Î¼û <function>stat</function>¡£ </simpara> </refsect1> </refentry> Index: phpdoc-zh/reference/filesystem/functions/fileperms.xml diff -u phpdoc-zh/reference/filesystem/functions/fileperms.xml:1.2 phpdoc-zh/reference/filesystem/functions/fileperms.xml:1.3 --- phpdoc-zh/reference/filesystem/functions/fileperms.xml:1.2 Sun Sep 29 22:55:19 2002 +++ phpdoc-zh/reference/filesystem/functions/fileperms.xml Mon Feb 24 04:12:29 2003 @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <!-- $Author: dallas $ --> -<!-- EN-Revision: 1.2 Maintainer: dallas Status: ready --> +<!-- EN-Revision: 1.3 Maintainer: dallas Status: ready --> <refentry id="function.fileperms"> <refnamediv> <refname>fileperms</refname> @@ -16,12 +16,10 @@ <para> ·µ»ØÎļþµÄ·ÃÎÊȨÏÞ£¬Èç¹û³ö´íÔò·µ»Ø &false;¡£ </para> - <para> - ±¾º¯ÊýµÄ½á¹û»á±»»º´æ¡£ÏêϸÐÅÏ¢¼û <function>clearstatcache</function>¡£ - </para> + ¬e.clearstatcache; + ¬e.no-remote; <simpara> - ±¾º¯Êý²»ÄÜÓÃÓÚ<link - linkend="features.remote-files">Ô¶³ÌÎļþ</link>£¬±»¼ì²éµÄÎļþ±ØÐëͨ¹ý·þÎñÆ÷µÄÎļþϵͳÀ´·ÃÎÊ¡£ + ²Î¼û <function>is_readable</function> ºÍ <function>stat</function>¡£ </simpara> </refsect1> </refentry> Index: phpdoc-zh/reference/filesystem/functions/filesize.xml diff -u phpdoc-zh/reference/filesystem/functions/filesize.xml:1.2 phpdoc-zh/reference/filesystem/functions/filesize.xml:1.3 --- phpdoc-zh/reference/filesystem/functions/filesize.xml:1.2 Sun Sep 29 22:55:19 2002 +++ phpdoc-zh/reference/filesystem/functions/filesize.xml Mon Feb 24 04:12:30 2003 @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <!-- $Author: dallas $ --> -<!-- EN-Revision: 1.2 Maintainer: dallas Status: ready --> +<!-- EN-Revision: 1.3 Maintainer: dallas Status: ready --> <refentry id="function.filesize"> <refnamediv> <refname>filesize</refname> @@ -16,12 +16,10 @@ <para> ·µ»ØÎļþ´óСµÄ×Ö½ÚÊý£¬Èç¹û³ö´í·µ»Ø &false;¡£ </para> - <para> - ±¾º¯ÊýµÄ½á¹û»á±»»º´æ¡£ÏêϸÐÅÏ¢¼û <function>clearstatcache</function>¡£ - </para> + ¬e.clearstatcache; + ¬e.no-remote; <simpara> - ±¾º¯Êý²»ÄÜÓÃÓÚ<link - linkend="features.remote-files">Ô¶³ÌÎļþ</link>£¬±»¼ì²éµÄÎļþ±ØÐëͨ¹ý·þÎñÆ÷µÄÎļþϵͳÀ´·ÃÎÊ¡£ + ²Î¼û <function>file_exists</function>¡£ </simpara> </refsect1> </refentry> Index: phpdoc-zh/reference/filesystem/functions/filetype.xml diff -u phpdoc-zh/reference/filesystem/functions/filetype.xml:1.3 phpdoc-zh/reference/filesystem/functions/filetype.xml:1.4 --- phpdoc-zh/reference/filesystem/functions/filetype.xml:1.3 Sun Jan 12 07:18:22 2003 +++ phpdoc-zh/reference/filesystem/functions/filetype.xml Mon Feb 24 04:12:31 2003 @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.3 $ --> +<!-- $Revision: 1.4 $ --> <!-- $Author: dallas $ --> -<!-- EN-Revision: 1.6 Maintainer: dallas Status: ready --> +<!-- EN-Revision: 1.7 Maintainer: dallas Status: ready --> <refentry id="function.filetype"> <refnamediv> <refname>filetype</refname> @@ -21,13 +21,8 @@ Èç¹û³ö´íÔò·µ»Ø &false;¡£Èç¹û stat µ÷ÓÃʧ°Ü»òÕßÎļþÀàÐÍδ֪µÄ»° <function>filetype</function> »¹»á²úÉúÒ»¸ö <constant>E_NOTICE</constant> ÏûÏ¢¡£ </para> - <para> - ±¾º¯ÊýµÄ½á¹û»á±»»º´æ¡£ÏêϸÐÅÏ¢¼û <function>clearstatcache</function>¡£ - </para> - <simpara> - ±¾º¯Êý²»ÄÜÓÃÓÚ<link - linkend="features.remote-files">Ô¶³ÌÎļþ</link>£¬±»¼ì²éµÄÎļþ±ØÐëͨ¹ý·þÎñÆ÷µÄÎļþϵͳÀ´·ÃÎÊ¡£ - </simpara> + ¬e.clearstatcache; + ¬e.no-remote; <simpara> ²Î¼û <function>is_dir</function>£¬<function>is_file</function>£¬<function>is_link</function>£¬<function>file_exists</function>
Index: phpdoc-zh/reference/filesystem/functions/chmod.xml diff -u phpdoc-zh/reference/filesystem/functions/chmod.xml:1.2 phpdoc-zh/reference/filesystem/functions/chmod.xml:1.3 --- phpdoc-zh/reference/filesystem/functions/chmod.xml:1.2 Sun Sep 29 22:54:17 2002 +++ phpdoc-zh/reference/filesystem/functions/chmod.xml Mon Feb 24 04:11:53 2003 @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <!-- $Author: dallas $ --> -<!-- EN-Revision: 1.3 Maintainer: dallas Status: ready --> +<!-- EN-Revision: 1.6 Maintainer: dallas Status: ready --> <refentry id="function.chmod"> <refnamediv> <refname>chmod</refname> @@ -24,16 +24,51 @@ <informalexample> <programlisting role="php"> <![CDATA[ +<?php chmod ("/somedir/somefile", 755); // Ê®½øÖÆÊý£¬¿ÉÄܲ»¶Ô chmod ("/somedir/somefile", "u+rwx,go+rx"); // ×Ö·û´®£¬²»¶Ô chmod ("/somedir/somefile", 0755); // °Ë½øÖÆÊý£¬ÕýÈ·µÄ mode Öµ +?> ]]> </programlisting> </informalexample> </para> <para> + <parameter>mode</parameter> ²ÎÊý°üº¬Èý¸ö°Ë½øÖÆÊý°´Ë³Ðò·Ö±ðÖ¸¶¨ÁËËùÓÐÕß¡¢ËùÓÐÕßËùÔÚµÄ×éÒÔ¼°ËùÓÐÈ˵ķÃÎÊÏÞÖÆ¡£Ã¿Ò»²¿·Ö¶¼¿ÉÒÔͨ¹ý¼ÓÈëËùÐèµÄȨÏÞÀ´¼ÆËã³öËùÒªµÄȨÏÞ¡£Êý×Ö 1 + ±íʾʹÎļþ¿ÉÖ´ÐУ¬Êý×Ö 2 ±íʾʹÎļþ¿Éд£¬Êý×Ö 4 + ±íʾʹÎļþ¿É¶Á¡£¼ÓÈëÕâЩÊý×ÖÀ´Öƶ¨ËùÐèÒªµÄȨÏÞ¡£ÓÐ¹Ø UNIX ϵͳµÄÎļþȨÏÞ¿ÉÒÔÔĶÁÊֲᡰman 1 + chmod¡±ºÍ¡°man 2 chmod¡±¡£ + <informalexample> + <programlisting role="php"> +<![CDATA[ +<?php +// Read and write for owner, nothing for everybody else +chmod ("/somedir/somefile", 0600); + +// Read and write for owner, read for everybody else +chmod ("/somedir/somefile", 0644); + +// Everything for owner, read and execute for others +chmod ("/somedir/somefile", 0755); + +// Everything for owner, read and execute for owner's group +chmod ("/somedir/somefile", 0750); +?> +]]> + </programlisting> + </informalexample> + </para> + <para> + <note> + <para> + µ±Ç°Óû§Ö¸µÄÊÇÖ´ÐÐ PHP µÄÓû§¡£ºÜ¿ÉÄܺÍͨ³£µÄ shell »òÕß FTP Óû§²»ÊÇͬһ¸ö¡£ + </para> + </note> + </para> + <para> &return.success; </para> + ¬e.no-remote; <para> ²Î¼û <function>chown</function> ºÍ <function>chgrp</function>¡£ </para> Index: phpdoc-zh/reference/filesystem/functions/chown.xml diff -u phpdoc-zh/reference/filesystem/functions/chown.xml:1.2 phpdoc-zh/reference/filesystem/functions/chown.xml:1.3 --- phpdoc-zh/reference/filesystem/functions/chown.xml:1.2 Sun Sep 29 22:54:17 2002 +++ phpdoc-zh/reference/filesystem/functions/chown.xml Mon Feb 24 04:12:14 2003 @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <!-- $Author: dallas $ --> -<!-- EN-Revision: 1.4 Maintainer: dallas Status: ready --> +<!-- EN-Revision: 1.5 Maintainer: dallas Status: ready --> <refentry id="function.chown"> <refnamediv> <refname>chown</refname> @@ -21,6 +21,7 @@ <para> &return.success; </para> + ¬e.no-remote; <para> ²Î¼û <function>chmod</function>¡£ </para> Index: phpdoc-zh/reference/filesystem/functions/copy.xml diff -u phpdoc-zh/reference/filesystem/functions/copy.xml:1.3 phpdoc-zh/reference/filesystem/functions/copy.xml:1.4 --- phpdoc-zh/reference/filesystem/functions/copy.xml:1.3 Sun Sep 29 22:54:17 2002 +++ phpdoc-zh/reference/filesystem/functions/copy.xml Mon Feb 24 04:12:19 2003 @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.3 $ --> +<!-- $Revision: 1.4 $ --> <!-- $Author: dallas $ --> -<!-- EN-Revision: 1.3 Maintainer: dallas Status: ready --> +<!-- EN-Revision: 1.4 Maintainer: dallas Status: ready --> <refentry id="function.copy"> <refnamediv> <refname>copy</refname> @@ -15,7 +15,7 @@ <methodparam><type>string</type><parameter>dest</parameter></methodparam> </methodsynopsis> <para> - ¿½±´Ò»¸öÎļþ¡£Èç¹û¿½±´³É¹¦Ôò·µ»Ø &true;£¬·ñÔò·µ»Ø &false;¡£ + ½«Îļþ´Ó <parameter>source</parameter> ¿½±´µ½ <parameter>dest</parameter>¡£&return.success; <example> <title><function>copy</function> Àý×Ó</title> <programlisting role="php"> Index: phpdoc-zh/reference/filesystem/functions/dirname.xml diff -u phpdoc-zh/reference/filesystem/functions/dirname.xml:1.2 phpdoc-zh/reference/filesystem/functions/dirname.xml:1.3 --- phpdoc-zh/reference/filesystem/functions/dirname.xml:1.2 Sun Sep 29 22:54:17 2002 +++ phpdoc-zh/reference/filesystem/functions/dirname.xml Mon Feb 24 04:12:20 2003 @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <!-- $Author: dallas $ --> -<!-- EN-Revision: 1.3 Maintainer: dallas Status: ready --> +<!-- EN-Revision: 1.4 Maintainer: dallas Status: ready --> <refentry id="function.dirname"> <refnamediv> <refname>dirname</refname> Index: phpdoc-zh/reference/filesystem/functions/disk-free-space.xml diff -u phpdoc-zh/reference/filesystem/functions/disk-free-space.xml:1.2 phpdoc-zh/reference/filesystem/functions/disk-free-space.xml:1.3 --- phpdoc-zh/reference/filesystem/functions/disk-free-space.xml:1.2 Sun Sep 29 22:54:17 2002 +++ phpdoc-zh/reference/filesystem/functions/disk-free-space.xml Mon Feb 24 04:12:20 2003 @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <!-- $Author: dallas $ --> -<!-- EN-Revision: 1.2 Maintainer: dallas Status: ready --> +<!-- EN-Revision: 1.3 Maintainer: dallas Status: ready --> <refentry id="function.disk-free-space"> <refnamediv> <refname>disk_free_space</refname> @@ -21,11 +21,18 @@ <title><function>disk_free_space</function> Àý×Ó</title> <programlisting role="php"> <![CDATA[ -$df = disk_free_space("/"); // $df °üº¬¸ùĿ¼Ï¿ÉÓõÄ×Ö½ÚÊý +<?php +// $df °üº¬¸ùĿ¼Ï¿ÉÓõÄ×Ö½ÚÊý +$df = disk_free_space("/"); +?> ]]> </programlisting> </example> </para> + ¬e.no-remote; + <simpara> + ²Î¼û <function>disk_total_space</function>¡£ + </simpara> </refsect1> </refentry> Index: phpdoc-zh/reference/filesystem/functions/disk-total-space.xml diff -u phpdoc-zh/reference/filesystem/functions/disk-total-space.xml:1.2 phpdoc-zh/reference/filesystem/functions/disk-total-space.xml:1.3 --- phpdoc-zh/reference/filesystem/functions/disk-total-space.xml:1.2 Sun Sep 29 22:54:17 2002 +++ phpdoc-zh/reference/filesystem/functions/disk-total-space.xml Mon Feb 24 04:12:20 2003 @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <!-- $Author: dallas $ --> -<!-- EN-Revision: 1.2 Maintainer: dallas Status: ready --> +<!-- EN-Revision: 1.3 Maintainer: dallas Status: ready --> <refentry id="function.disk-total-space"> <refnamediv> <refname>disk_total_space</refname> @@ -21,11 +21,18 @@ <title><function>disk_total_space</function> Àý×Ó</title> <programlisting role="php"> <![CDATA[ -$df = disk_total_space("/"); // $df °üº¬ "/" Ŀ¼µÄ´ÅÅÌ´óС +<?php +// $df °üº¬ "/" Ŀ¼µÄ´ÅÅÌ´óС +$df = disk_total_space("/"); +?> ]]> </programlisting> </example> </para> + ¬e.no-remote; + <simpara> + ²Î¼û <function>disk_free_space</function>¡£ + </simpara> <simpara> ¡¾ÒëÕß×¢¡¿±¾º¯Êý·µ»ØµÄÊǸÃĿ¼ËùÔڵĴÅÅÌ·ÖÇøµÄ×Ü´óС£¬Òò´ËÔÚ¸ø³öͬһ¸ö´ÅÅÌ·ÖÇøµÄ²»Í¬Ä¿Â¼×÷Ϊ²ÎÊýËùµÃµ½µÄ½á¹ûÍêÈ«Ïàͬ¡£ÔÚ UNIX ºÍ Windows 2000 Öж¼Ö§³Ö½«Ò»¸ö´ÅÅÌ·ÖÇø¼ÓÔØÎªÒ»¸ö×ÓĿ¼£¬ÕâʱÕýȷʹÓñ¾º¯Êý¾ÍºÜÓÐÒâÒå¡£ Index: phpdoc-zh/reference/filesystem/functions/fclose.xml diff -u phpdoc-zh/reference/filesystem/functions/fclose.xml:1.4 phpdoc-zh/reference/filesystem/functions/fclose.xml:1.5 --- phpdoc-zh/reference/filesystem/functions/fclose.xml:1.4 Sun Jan 12 07:05:51 2003 +++ phpdoc-zh/reference/filesystem/functions/fclose.xml Mon Feb 24 04:12:20 2003 @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.4 $ --> +<!-- $Revision: 1.5 $ --> <!-- $Author: dallas $ --> -<!-- EN-Revision: 1.4 Maintainer: dallas Status: ready --> +<!-- EN-Revision: 1.54 Maintainer: dallas Status: ready --> <refentry id="function.fclose"> <refnamediv> <refname>fclose</refname> @@ -11,10 +11,10 @@ <title>˵Ã÷</title> <methodsynopsis> <type>bool</type><methodname>fclose</methodname> - <methodparam><type>resource</type><parameter>fp</parameter></methodparam> + <methodparam><type>resource</type><parameter>handle</parameter></methodparam> </methodsynopsis> <para> - ½« <parameter>fp</parameter> Ö¸ÏòµÄÎļþ¹Ø±Õ¡£ + ½« <parameter>handle</parameter> Ö¸ÏòµÄÎļþ¹Ø±Õ¡£ </para> <para> &return.success; @@ -30,11 +30,8 @@ <programlisting role="php"> <![CDATA[ <?php - - $fp = fopen('somefile.txt', 'r'); - - fclose($fp); - + $handle = fopen('somefile.txt', 'r'); + fclose($handle); ?> ]]> </programlisting> Index: phpdoc-zh/reference/filesystem/functions/feof.xml diff -u phpdoc-zh/reference/filesystem/functions/feof.xml:1.3 phpdoc-zh/reference/filesystem/functions/feof.xml:1.4 --- phpdoc-zh/reference/filesystem/functions/feof.xml:1.3 Sun Jan 12 07:05:52 2003 +++ phpdoc-zh/reference/filesystem/functions/feof.xml Mon Feb 24 04:12:22 2003 @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.3 $ --> +<!-- $Revision: 1.4 $ --> <!-- $Author: dallas $ --> -<!-- EN-Revision: 1.3 Maintainer: dallas Status: ready --> +<!-- EN-Revision: 1.4 Maintainer: dallas Status: ready --> <refentry id="function.feof"> <refnamediv> <refname>feof</refname> @@ -11,7 +11,7 @@ <title>˵Ã÷</title> <methodsynopsis> <type>bool</type><methodname>feof</methodname> - <methodparam><type>resource</type><parameter>fp</parameter></methodparam> + <methodparam><type>resource</type><parameter>handle</parameter></methodparam> </methodsynopsis> <para> Èç¹ûÎļþÖ¸Õëµ½ÁË EOF »òÕß³ö´íʱÔò·µ»Ø &true;£¬·ñÔò·µ»Ø &false;¡£ Index: phpdoc-zh/reference/filesystem/functions/fflush.xml diff -u phpdoc-zh/reference/filesystem/functions/fflush.xml:1.3 phpdoc-zh/reference/filesystem/functions/fflush.xml:1.4 --- phpdoc-zh/reference/filesystem/functions/fflush.xml:1.3 Sun Jan 12 07:05:52 2003 +++ phpdoc-zh/reference/filesystem/functions/fflush.xml Mon Feb 24 04:12:22 2003 @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.3 $ --> +<!-- $Revision: 1.4 $ --> <!-- $Author: dallas $ --> -<!-- EN-Revision: 1.4 Maintainer: dallas Status: ready --> +<!-- EN-Revision: 1.5 Maintainer: dallas Status: ready --> <refentry id="function.fflush"> <refnamediv> <refname>fflush</refname> @@ -11,11 +11,11 @@ <title>˵Ã÷</title> <methodsynopsis> <type>bool</type><methodname>fflush</methodname> - <methodparam><type>resource</type><parameter>fp</parameter></methodparam> + <methodparam><type>resource</type><parameter>handle</parameter></methodparam> </methodsynopsis> <para> ±¾º¯ÊýÇ¿ÖÆ½«ËùÓлº³åµÄÊä³öдÈë - <parameter>fp</parameter> Îļþ¾ä±úËùÖ¸ÏòµÄ×ÊÔ´¡£³É¹¦·µ»Ø &true;£¬·ñÔò·µ»Ø &false;¡£ + <parameter>handle</parameter> Îļþ¾ä±úËùÖ¸ÏòµÄ×ÊÔ´¡£³É¹¦·µ»Ø &true;£¬·ñÔò·µ»Ø &false;¡£ </para> <para> ÎļþÖ¸Õë±ØÐëÓÐЧ£¬²¢ÇÒÊÇͨ¹ý Index: phpdoc-zh/reference/filesystem/functions/fgetc.xml diff -u phpdoc-zh/reference/filesystem/functions/fgetc.xml:1.3 phpdoc-zh/reference/filesystem/functions/fgetc.xml:1.4 --- phpdoc-zh/reference/filesystem/functions/fgetc.xml:1.3 Sun Jan 12 07:05:52 2003 +++ phpdoc-zh/reference/filesystem/functions/fgetc.xml Mon Feb 24 04:12:24 2003 @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.3 $ --> +<!-- $Revision: 1.4 $ --> <!-- $Author: dallas $ --> -<!-- EN-Revision: 1.3 Maintainer: dallas Status: ready --> +<!-- EN-Revision: 1.8 Maintainer: dallas Status: ready --> <refentry id="function.fgetc"> <refnamediv> <refname>fgetc</refname> @@ -11,15 +11,23 @@ <title>˵Ã÷</title> <methodsynopsis> <type>string</type><methodname>fgetc</methodname> - <methodparam><type>resource</type><parameter>fp</parameter></methodparam> + <methodparam><type>resource</type><parameter>handle</parameter></methodparam> </methodsynopsis> <para> - ·µ»ØÒ»¸ö°üº¬ÓÐÒ»¸ö×Ö·ûµÄ×Ö·û´®£¬¸Ã×Ö·û´Ó fp Ö¸ÏòµÄÎļþÖеõ½¡£Åöµ½ EOF Ôò·µ»Ø &false;¡£ + ·µ»ØÒ»¸ö°üº¬ÓÐÒ»¸ö×Ö·ûµÄ×Ö·û´®£¬¸Ã×Ö·û´Ó <parameter>handle</parameter> + Ö¸ÏòµÄÎļþÖеõ½¡£Åöµ½ EOF Ôò·µ»Ø &false;¡£ </para> <para> ÎļþÖ¸Õë±ØÐëÓÐЧ£¬²¢ÇÒÊÇͨ¹ý <function>fopen</function>£¬<function>popen</function> »ò <function>fsockopen</function> ³É¹¦´ò¿ªµÄ¡£ + </para> + <para> + <note> + <para> + ±¾º¯Êý¿É°²È«ÓÃÓÚ¶þ½øÖÆÎļþ¡£ + </para> + </note> </para> <para> ²Î¼û <function>fread</function>£¬<function>fopen</function>£¬<function>popen</function>£¬<function>fsockopen</function> Index: phpdoc-zh/reference/filesystem/functions/fgetcsv.xml diff -u phpdoc-zh/reference/filesystem/functions/fgetcsv.xml:1.2 phpdoc-zh/reference/filesystem/functions/fgetcsv.xml:1.3 --- phpdoc-zh/reference/filesystem/functions/fgetcsv.xml:1.2 Sun Sep 29 22:54:17 2002 +++ phpdoc-zh/reference/filesystem/functions/fgetcsv.xml Mon Feb 24 04:12:25 2003 @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <!-- $Author: dallas $ --> -<!-- EN-Revision: 1.4 Maintainer: dallas Status: ready --> +<!-- EN-Revision: 1.7 Maintainer: dallas Status: ready --> <refentry id="function.fgetcsv"> <refnamediv> <refname>fgetcsv</refname> @@ -11,7 +11,7 @@ <title>˵Ã÷</title> <methodsynopsis> <type>array</type><methodname>fgetcsv</methodname> - <methodparam><type>int</type><parameter>fp</parameter></methodparam> + <methodparam><type>int</type><parameter>handle</parameter></methodparam> <methodparam><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> @@ -19,11 +19,18 @@ <simpara> ºÍ <function>fgets</function> ÀàËÆ£¬Ö»³ýÁË <function>fgetcsv</function> ½âÎö¶ÁÈëµÄÐв¢ÕÒ³ö <acronym>CSV</acronym> - ¸ñʽµÄ×Ö¶ÎÈ»ºó·µ»ØÒ»¸ö°üº¬ÕâЩ×ֶεÄÊý×é¡£×ֶηָô·ûÊǶººÅ£¬»òÕßÓÿÉÑ¡µÄµÚÈý¸ö²ÎÊýÁíÍâÖ¸¶¨¡£×Ö¶ÎÓÃË«ÒýºÅ°üΧ£¬»òÕßÓÿÉÑ¡µÄµÚËĸö²ÎÊýÁíÍâÖ¸¶¨¡£<parameter>Delimiter</parameter> - ºÍ <parameter>enclosure</parameter> ²»ÄÜÊÇ null ²¢ÇÒÖ»ÓеÚÒ»¸ö×Ö·ûÓÐЧ¡£ + ¸ñʽµÄ×Ö¶ÎÈ»ºó·µ»ØÒ»¸ö°üº¬ÕâЩ×ֶεÄÊý×é¡£¿ÉÑ¡µÄµÚÈý¸ö²ÎÊý + <parameter>delimiter</parameter> µÄĬÈÏÖµÊǶººÅ¡£¿ÉÑ¡²ÎÊý <parameter>enclosure</parameter> + ²»ÄÜÊÇ <type>null</type> ²¢ÇÒ±»ÏÞÖÆÎªÒ»¸ö×Ö·û¡£Èç¹û <parameter>enclosure</parameter> + ¶àÓÚÒ»¸ö×Ö·û£¬ÔòÖ»ÓеÚÒ»¸ö×Ö·ûÓÐЧ¡£ </simpara> + <note> + <simpara> + <parameter>enclosure</parameter> ²ÎÊýÊÇ PHP 4.3.0 мӵġ£ + </simpara> + </note> <simpara> - <parameter>fp</parameter> ±ØÐëÊÇͨ¹ý + <parameter>handle</parameter> ±ØÐëÊÇͨ¹ý <function>fopen</function>£¬<function>popen</function> »òÕß <function>fsockopen</function> ³É¹¦´ò¿ªµÄÓÐЧÎļþÖ¸Õë¡£ </simpara> @@ -35,32 +42,31 @@ </simpara> <note> <simpara> - CSV ÎļþÖеĿÕÐн«±»·µ»ØÎªÒ»¸ö°üº¬Óе¥¸ö &null; ×ֶεÄÊý×飬²»»á±»µ±³É´íÎó¡£ - </simpara> - <simpara> - <parameter>enclosure</parameter> ÊÇ PHP 4.3.0 мӵġ£ + CSV ÎļþÖеĿÕÐн«±»·µ»ØÎªÒ»¸ö°üº¬Óе¥¸ö <type>null</type> ×ֶεÄÊý×飬²»»á±»µ±³É´íÎó¡£ </simpara> </note> - <example> - <title> - <function>fgetcsv</function> Àý×Ó - ¶ÁÈ¡²¢ÏÔʾ CSV ÎļþµÄÕû¸öÄÚÈÝ - </title> - <programlisting role="php"> + <para> + <example> + <title>¶ÁÈ¡²¢ÏÔʾ CSV ÎļþµÄÕû¸öÄÚÈÝ</title> + <programlisting role="php"> <![CDATA[ +<?php $row = 1; -$fp = fopen ("test.csv","r"); -while ($data = fgetcsv ($fp, 1000, ",")) { +$handle = fopen ("test.csv","r"); +while ($data = fgetcsv ($handle, 1000, ",")) { $num = count ($data); - print "<p> $num fields in line $row: <br>"; + print "<p> $num fields in line $row: <br>\n"; $row++; for ($c=0; $c < $num; $c++) { - print $data[$c] . "<br>"; + print $data[$c] . "<br>\n"; } } -fclose ($fp); +fclose ($handle); +?> ]]> - </programlisting> - </example> + </programlisting> + </example> + </para> </refsect1> </refentry> Index: phpdoc-zh/reference/filesystem/functions/fgets.xml diff -u phpdoc-zh/reference/filesystem/functions/fgets.xml:1.3 phpdoc-zh/reference/filesystem/functions/fgets.xml:1.4 --- phpdoc-zh/reference/filesystem/functions/fgets.xml:1.3 Sun Sep 29 22:54:17 2002 +++ phpdoc-zh/reference/filesystem/functions/fgets.xml Mon Feb 24 04:12:26 2003 @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.3 $ --> +<!-- $Revision: 1.4 $ --> <!-- $Author: dallas $ --> -<!-- EN-Revision: 1.3 Maintainer: dallas Status: ready --> +<!-- EN-Revision: 1.7 Maintainer: dallas Status: ready --> <refentry id="function.fgets"> <refnamediv> <refname>fgets</refname> @@ -11,11 +11,11 @@ <title>˵Ã÷</title> <methodsynopsis> <type>string</type><methodname>fgets</methodname> - <methodparam><type>int</type><parameter>fp</parameter></methodparam> + <methodparam><type>int</type><parameter>handle</parameter></methodparam> <methodparam choice="opt"><type>int</type><parameter>length</parameter></methodparam> </methodsynopsis> <para> - ´Ó fp Ö¸ÏòµÄÎļþÖжÁȡһÐв¢·µ»Ø³¤¶È×î¶àΪ length - 1 + ´Ó <parameter>handle</parameter> Ö¸ÏòµÄÎļþÖжÁȡһÐв¢·µ»Ø³¤¶È×î¶àΪ length - 1 ×Ö½ÚµÄ×Ö·û´®¡£Åöµ½»»Ðзû£¨°üÀ¨ÔÚ·µ»ØÖµÖУ©¡¢EOF »òÕßÒѾ¶ÁÈ¡ÁË length - 1 ×Ö½ÚºóÍ£Ö¹£¨¿´ÏÈÅöµ½ÄÇÒ»ÖÖÇé¿ö£©¡£Èç¹ûûÓÐÖ¸¶¨ length£¬ÔòĬÈÏΪ 1K£¬»òÕß˵ 1024 ×Ö½Ú¡£ </para> @@ -40,19 +40,27 @@ <title>ÖðÐжÁÈ¡Îļþ</title> <programlisting role="php"> <![CDATA[ -$fd = fopen ("/tmp/inputfile.txt", "r"); -while (!feof ($fd)) { +$handle = fopen ("/tmp/inputfile.txt", "r"); +while (!feof ($handle)) { $buffer = fgets($fd, 4096); echo $buffer; } -fclose ($fd); +fclose ($handle); ]]> </programlisting> </example> </para> <note> <simpara> - <parameter>length</parameter> ²ÎÊý´Ó PHP 4.2.0 Æð³ÉΪ¿ÉÑ¡Ïî¡£ + <parameter>length</parameter> ²ÎÊý´Ó PHP 4.2.0 + Æð³ÉΪ¿ÉÑ¡ÏÈç¹ûºöÂÔ£¬ÔòÐеij¤¶È±»¼Ù¶¨Îª 1024¡£´Ó PHP 4.3 ¿ªÊ¼£¬ºöÂÔµô + <parameter>length</parameter> ½«¼ÌÐø´ÓÁ÷ÖжÁÈ¡Êý¾ÝÖ±µ½ÐнáÊø¡£Èç¹ûÎļþÖеĴó¶àÊýÐж¼´óÓÚ + 8KB£¬ÔòÔڽű¾ÖÐÖ¸¶¨×î´óÐеij¤¶ÈÔÚÀûÓÃ×ÊÔ´ÉϸüΪÓÐЧ¡£ + </simpara> + </note> + <note> + <simpara> + ´Ó PHP 4.3 ¿ªÊ¼±¾º¯Êý¿ÉÒÔ°²È«ÓÃÓÚ¶þ½øÖÆÎļþ¡£ÔçÆÚµÄ°æ±¾Ôò²»ÐС£ </simpara> </note> ¬e.line-endings; Index: phpdoc-zh/reference/filesystem/functions/fgetss.xml diff -u phpdoc-zh/reference/filesystem/functions/fgetss.xml:1.4 phpdoc-zh/reference/filesystem/functions/fgetss.xml:1.5 --- phpdoc-zh/reference/filesystem/functions/fgetss.xml:1.4 Sun Jan 12 07:18:22 2003 +++ phpdoc-zh/reference/filesystem/functions/fgetss.xml Mon Feb 24 04:12:26 2003 @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.4 $ --> +<!-- $Revision: 1.5 $ --> <!-- $Author: dallas $ --> -<!-- EN-Revision: 1.4 Maintainer: dallas Status: ready --> +<!-- EN-Revision: 1.5 Maintainer: dallas Status: ready --> <refentry id="function.fgetss"> <refnamediv> <refname>fgetss</refname> @@ -11,7 +11,7 @@ <title>˵Ã÷</title> <methodsynopsis> <type>string</type><methodname>fgetss</methodname> - <methodparam><type>resource</type><parameter>fp</parameter></methodparam> + <methodparam><type>resource</type><parameter>handle</parameter></methodparam> <methodparam><type>int</type><parameter>length</parameter></methodparam> <methodparam choice="opt"><type>string</type><parameter>allowable_tags</parameter></methodparam> </methodsynopsis> Index: phpdoc-zh/reference/filesystem/functions/file-exists.xml diff -u phpdoc-zh/reference/filesystem/functions/file-exists.xml:1.3 phpdoc-zh/reference/filesystem/functions/file-exists.xml:1.4 --- phpdoc-zh/reference/filesystem/functions/file-exists.xml:1.3 Tue Oct 22 01:41:18 2002 +++ phpdoc-zh/reference/filesystem/functions/file-exists.xml Mon Feb 24 04:12:26 2003 @@ -1,11 +1,11 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.3 $ --> -<!-- $Author: yincheng $ --> -<!-- EN-Revision: 1.4 Maintainer: dallas Status: ready --> +<!-- $Revision: 1.4 $ --> +<!-- $Author: dallas $ --> +<!-- EN-Revision: 1.7 Maintainer: dallas Status: ready --> <refentry id="function.file-exists"> <refnamediv> <refname>file_exists</refname> - <refpurpose>¼ì²éÎļþÊÇ·ñ´æÔÚ</refpurpose> + <refpurpose>¼ì²éÎļþ»òĿ¼ÊÇ·ñ´æÔÚ</refpurpose> </refnamediv> <refsect1> <title>˵Ã÷</title> @@ -14,17 +14,9 @@ <methodparam><type>string</type><parameter>filename</parameter></methodparam> </methodsynopsis> <simpara> - Èç¹ûÓÉ <parameter>filename</parameter> Ö¸¶¨µÄÎļþ´æÔÚÔò·µ»Ø + Èç¹ûÓÉ <parameter>filename</parameter> Ö¸¶¨µÄÎļþ»òĿ¼´æÔÚÔò·µ»Ø &true;£¬·ñÔò·µ»Ø &false;¡£ </simpara> - <simpara> - ±¾º¯Êý²»ÄÜÓÃÓÚ<link - linkend="features.remote-files">Ô¶³ÌÎļþ</link>£¬±»¼ì²éµÄÎļþ±ØÐëͨ¹ý·þÎñÆ÷µÄÎļþϵͳÀ´·ÃÎÊ¡£ - </simpara> - <simpara> - ±¾º¯ÊýµÄ·µ»Ø½á¹û»á±»»º´æ¡£¸ü¶àÏêϸ×ÊÁϼû - <function>clearstatcache</function>¡£ - </simpara> <note> <title>ʹÓà Windows ¹²Ïí</title> <para> @@ -50,8 +42,13 @@ </programlisting> </example> </para> + + ¬e.clearstatcache; + + ¬e.no-remote; + <para> -²Î¼û <function>is_readable</function>£¬<function>is_writable</function>£¬<function>is_file</function> ºÍ <function>file</function>¡£ + ²Î¼û <function>is_readable</function>£¬<function>is_writable</function>£¬<function>is_file</function> ºÍ <function>file</function>¡£ </para> </refsect1> </refentry> Index: phpdoc-zh/reference/filesystem/functions/file.xml diff -u phpdoc-zh/reference/filesystem/functions/file.xml:1.3 phpdoc-zh/reference/filesystem/functions/file.xml:1.4 --- phpdoc-zh/reference/filesystem/functions/file.xml:1.3 Sun Sep 29 22:55:19 2002 +++ phpdoc-zh/reference/filesystem/functions/file.xml Mon Feb 24 04:12:26 2003 @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.3 $ --> +<!-- $Revision: 1.4 $ --> <!-- $Author: dallas $ --> -<!-- EN-Revision: 1.3 Maintainer: dallas Status: ready --> +<!-- EN-Revision: 1.7 Maintainer: dallas Status: ready --> <refentry id="function.file"> <refnamediv> <refname>file</refname> @@ -15,8 +15,9 @@ <methodparam choice="opt"><type>int</type><parameter>use_include_path</parameter></methodparam> </methodsynopsis> <para> - ºÍ <function>readfile</function> Ò»Ñù£¬Ö»³ýÁË - <function>file</function> ½«Îļþ×÷Ϊһ¸öÊý×é·µ»Ø¡£Êý×éÖеÄÿ¸öµ¥Ôª¶¼ÊÇÎļþÖÐÏàÓ¦µÄÒ»ÐУ¬°üÀ¨»»ÐзûÔÚÄÚ¡£ + ºÍ <function>readfile</function> Ò»Ñù£¬Ö»³ýÁË <function>file</function> + ½«Îļþ×÷Ϊһ¸öÊý×é·µ»Ø¡£Êý×éÖеÄÿ¸öµ¥Ôª¶¼ÊÇÎļþÖÐÏàÓ¦µÄÒ»ÐУ¬°üÀ¨»»ÐзûÔÚÄÚ¡£Èç¹ûʧ°Ü + <function>file</function> ·µ»Ø &false;¡£ </para> <note> <para> @@ -26,22 +27,22 @@ </note> ¬e.line-endings; <para> - ¿ÉÒÔ½«¿ÉÑ¡µÄµÚ¶þ¸ö²ÎÊýÉèΪ "1"£¬Èç¹ûÒ²ÏëÔÚ <link - linkend="ini.include-path">include_path</link> ÖÐËÑѰÎļþµÄ»°¡£ + Èç¹ûÒ²ÏëÔÚ <link linkend="ini.include-path">include_path</link> + ÖÐËÑѰÎļþµÄ»°£¬¿ÉÒÔ½«¿ÉÑ¡²ÎÊý <parameter>use_include_path</parameter> ÉèΪ "1"¡£ </para> <para> <informalexample> <programlisting role="php"> <![CDATA[ <?php -// ½«Ò»¸ö web Ò³Ãæ¶ÁÈëµ½Ò»¸öÊý×éÖв¢Êä³ö -$fcontents = file ('http://www.example.com/'); -while (list ($line_num, $line) = each ($fcontents)) { - echo "<b>Line $line_num:</b>; ", htmlspecialchars ($line), "<br>\n"; +// ½«Ò»¸öÎļþ¶ÁÈëÊý×é¡£±¾ÀýÖÐͨ¹ý HTTP ´Ó URL ÖÐÈ¡µÃ HTML Ô´Îļþ¡£ +$lines = file ('http://www.example.com/'); +// ÔÚÊý×éÖÐÑ»·£¬ÏÔʾ html µÄÔ´Îļþ²¢¼ÓÉÏÐкš£ +foreach ($lines as $line_num => $line) { + echo "Line #<b>{$line_num}</b> : " . htmlspecialchars($line) . "<br>\n"; } - -// ½«Ò»¸ö web Ò³Ãæ¶ÁÈëµ½Ò»¸ö×Ö·û´® -$fcontents = implode ('', file ('http://www.example.com/')); +// ÁíÒ»¸öÀý×Ó½« web Ò³Ãæ¶ÁÈë×Ö·û´®¡£²Î¼û file_get_contents()¡£ +$html = implode ('', file ('http://www.example.com/')); ?> ]]> </programlisting> @@ -50,14 +51,16 @@ <note> <para> ´Ó PHP 4.3.0 ¿ªÊ¼¿ÉÒÔÓà <function>file_get_contents</function> - À´½«Îļþ¶ÁÈëµ½Ò»¸ö×Ö·û´®·µ»Ø£¬¶þ½øÖÆÎļþÒ²¿ÉÒÔ¡£ + À´½«Îļþ¶ÁÈëµ½Ò»¸ö×Ö·û´®·µ»Ø¡£ + </para> + <para> + ´Ó PHP 4.3.0 ¿ªÊ¼ <function>file</function> ¿ÉÒÔ°²È«ÓÃÓÚ¶þ½øÖÆÎļþ¡£ </para> </note> - ¬e.not-bin-safe; &tip.fopen-wrapper; <para> - ²Î¼û <function>readfile</function>£¬<function>fopen</function>£¬<function>fsockopen</function> - ºÍ <function>popen</function>¡£ + ²Î¼û <function>readfile</function>£¬<function>fopen</function>£¬<function>fsockopen</function>£¬<function>popen</function>£¬<function>file_get_contents</function> + ºÍ <function>include</function>¡£ </para> </refsect1> </refentry> Index: phpdoc-zh/reference/filesystem/functions/fileatime.xml diff -u phpdoc-zh/reference/filesystem/functions/fileatime.xml:1.2 phpdoc-zh/reference/filesystem/functions/fileatime.xml:1.3 --- phpdoc-zh/reference/filesystem/functions/fileatime.xml:1.2 Sun Sep 29 22:55:19 2002 +++ phpdoc-zh/reference/filesystem/functions/fileatime.xml Mon Feb 24 04:12:27 2003 @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <!-- $Author: dallas $ --> -<!-- EN-Revision: 1.2 Maintainer: dallas Status: ready --> +<!-- EN-Revision: 1.3 Maintainer: dallas Status: ready --> <refentry id="function.fileatime"> <refnamediv> <refname>fileatime</refname> @@ -17,17 +17,18 @@ ·µ»ØÎļþÉϴα»·ÃÎʵÄʱ¼ä£¬Èç¹û³ö´íÔò·µ»Ø &false;¡£Ê±¼äÒÔ Unix ʱ¼ä´ÁµÄ·½Ê½·µ»Ø¡£ </simpara> <simpara> - ±¾º¯ÊýµÄ½á¹û»á±»»º´æ¡£ÏêϸÐÅÏ¢¼û <function>clearstatcache</function>¡£ - </simpara> - <simpara> ×¢Ò⣺һ¸öÎļþµÄ atime Ó¦¸ÃÔÚ²»ÂÛºÎʱ¶ÁÈ¡ÁË´ËÎļþÖеÄÊý¾Ý¿éʱ±»¸ü¸Ä¡£µ±Ò»¸öÓ¦ÓóÌÐò¶¨ÆÚ·ÃÎÊ´óÁ¿Îļþ»òĿ¼ʱºÜÓ°ÏìÐÔÄÜ¡£ÓÐЩ Unix Îļþϵͳ¿ÉÒÔÔÚ¼ÓÔØÊ±¹Ø±Õ atime µÄ¸üÐÂÒÔÌá¸ßÕâÀà³ÌÐòµÄÐÔÄÜ¡£USENET ÐÂÎÅ×é¼ÙÍÑ»úÊÇÒ»¸ö³£¼ûµÄÀý×Ó¡£ÔÚÕâÖÖÎļþϵͳϱ¾º¯ÊýûÓÐÓô¦¡£ </simpara> + + ¬e.clearstatcache; + + ¬e.no-remote; + <simpara> - ±¾º¯Êý²»ÄÜÓÃÓÚ<link - linkend="features.remote-files">Ô¶³ÌÎļþ</link>£¬±»¼ì²éµÄÎļþ±ØÐëͨ¹ý·þÎñÆ÷µÄÎļþϵͳÀ´·ÃÎÊ¡£ + ²Î¼û <function>filemtime</function>£¬<function>fileinode</function> ºÍ <function>date</function>¡£ </simpara> </refsect1> </refentry> Index: phpdoc-zh/reference/filesystem/functions/filectime.xml diff -u phpdoc-zh/reference/filesystem/functions/filectime.xml:1.2 phpdoc-zh/reference/filesystem/functions/filectime.xml:1.3 --- phpdoc-zh/reference/filesystem/functions/filectime.xml:1.2 Sun Sep 29 22:55:19 2002 +++ phpdoc-zh/reference/filesystem/functions/filectime.xml Mon Feb 24 04:12:27 2003 @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <!-- $Author: dallas $ --> -<!-- EN-Revision: 1.2 Maintainer: dallas Status: ready --> +<!-- EN-Revision: 1.3 Maintainer: dallas Status: ready --> <refentry id="function.filectime"> <refnamediv> <refname>filectime</refname> @@ -17,9 +17,6 @@ ·µ»ØÎļþÉÏ´Î inode ±»Ð޸ĵÄʱ¼ä£¬Èç¹û³ö´íÔò·µ»Ø &false;¡£Ê±¼äÒÔ Unix ʱ¼ä´ÁµÄ·½Ê½·µ»Ø¡£ </para> <para> - ±¾º¯ÊýµÄ½á¹û»á±»»º´æ¡£ÏêϸÐÅÏ¢¼û <function>clearstatcache</function>¡£ - </para> - <para> ×¢Ò⣺ÔÚ´ó¶àÊý Unix ÎļþϵͳÖУ¬µ±Ò»¸öÎļþµÄ inode Êý¾Ý±»¸Ä±äʱÔò¸ÃÎļþ±»ÈÏΪÊÇÐÞ¸ÄÁË¡£Ò²¾ÍÊÇ˵£¬µ±ÎļþµÄȨÏÞ£¬ËùÓÐÕߣ¬ËùÓÐ×é»òÆäËü inode ÖеÄÔªÊý¾Ý±»¸üÐÂʱ¡£²Î¼û @@ -30,9 +27,13 @@ ×¢ÒâijЩ Unix ˵Ã÷Îı¾ÖÐ°Ñ ctime ˵³ÉÊǸÃÎļþ½¨Á¢µÄʱ¼ä£¬ÕâÊÇ´íµÄ¡£ÔÚ´ó¶àÊý Unix ÎļþϵͳÖÐûÓÐ Unix ÎļþµÄ½¨Á¢Ê±¼ä¡£ </para> + + ¬e.clearstatcache; + + ¬e.no-remote; + <simpara> - ±¾º¯Êý²»ÄÜÓÃÓÚ<link - linkend="features.remote-files">Ô¶³ÌÎļþ</link>£¬±»¼ì²éµÄÎļþ±ØÐëͨ¹ý·þÎñÆ÷µÄÎļþϵͳÀ´·ÃÎÊ¡£ + ²Î¼û <function>filemtime</function>¡£ </simpara> </refsect1> </refentry> Index: phpdoc-zh/reference/filesystem/functions/filegroup.xml diff -u phpdoc-zh/reference/filesystem/functions/filegroup.xml:1.2 phpdoc-zh/reference/filesystem/functions/filegroup.xml:1.3 --- phpdoc-zh/reference/filesystem/functions/filegroup.xml:1.2 Sat Sep 28 18:31:19 2002 +++ phpdoc-zh/reference/filesystem/functions/filegroup.xml Mon Feb 24 04:12:28 2003 @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <!-- $Author: dallas $ --> -<!-- EN-Revision: 1.4 Maintainer: dallas Status: ready --> +<!-- EN-Revision: 1.5 Maintainer: dallas Status: ready --> <refentry id="function.filegroup"> <refnamediv> <refname>filegroup</refname> @@ -16,17 +16,17 @@ <para> È¡µÃ¸ÃÎļþËùÊô×éµÄ ID¡£Èç¹û³ö´íÔò·µ»Ø &false;¡£×é ID ÒÔÊý×Ö¸ñʽ·µ»Ø£¬Óà - <function>posix_getgrgid</function> À´½«Æä½âÎöΪ×éÃû¡£ + <function>posix_getgrgid</function> À´½«Æä½âÎöΪ×éÃû¡£Èç¹ûʧ°Ü·µ»Ø + &false; ÒÔ¼°Ò»¸ö <constant>E_WARNING</constant> ¼¶±ðµÄ´íÎó¡£ </para> <para> ±¾º¯ÊýµÄ½á¹û»á±»»º´æ¡£ÏêϸÐÅÏ¢¼û <function>clearstatcache</function>¡£ </para> - <note> - <simpara> - ±¾º¯Êý²»ÄÜÓÃÓÚ<link - linkend="features.remote-files">Ô¶³ÌÎļþ</link>£¬±»¼ì²éµÄÎļþ±ØÐëͨ¹ý·þÎñÆ÷µÄÎļþϵͳÀ´·ÃÎÊ¡£ - </simpara> - </note> + ¬e.clearstatcache; + ¬e.no-remote; + <simpara> + ²Î¼û <function>fileowner</function> ºÍ <link linkend="ini.safe-mode-gid">safe_mode_gid</link>¡£ + </simpara> </refsect1> </refentry> Index: phpdoc-zh/reference/filesystem/functions/fileinode.xml diff -u phpdoc-zh/reference/filesystem/functions/fileinode.xml:1.2 phpdoc-zh/reference/filesystem/functions/fileinode.xml:1.3 --- phpdoc-zh/reference/filesystem/functions/fileinode.xml:1.2 Sun Sep 29 22:55:19 2002 +++ phpdoc-zh/reference/filesystem/functions/fileinode.xml Mon Feb 24 04:12:28 2003 @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <!-- $Author: dallas $ --> -<!-- EN-Revision: 1.3 Maintainer: dallas Status: ready --> +<!-- EN-Revision: 1.4 Maintainer: dallas Status: ready --> <refentry id="function.fileinode"> <refnamediv> <refname>fileinode</refname> @@ -16,12 +16,10 @@ <para> ·µ»ØÎļþµÄ inode ½ÚµãºÅ£¬³ö´íʱ·µ»Ø &false;¡£ </para> - <para> - ±¾º¯ÊýµÄ½á¹û»á±»»º´æ¡£ÏêϸÐÅÏ¢¼û <function>clearstatcache</function>¡£ - </para> + ¬e.clearstatcache; + ¬e.no-remote; <simpara> - ±¾º¯Êý²»ÄÜÓÃÓÚ<link - linkend="features.remote-files">Ô¶³ÌÎļþ</link>£¬±»¼ì²éµÄÎļþ±ØÐëͨ¹ý·þÎñÆ÷µÄÎļþϵͳÀ´·ÃÎÊ¡£ + ²Î¼û <function>stat</function>¡£ </simpara> </refsect1> </refentry> Index: phpdoc-zh/reference/filesystem/functions/filemtime.xml diff -u phpdoc-zh/reference/filesystem/functions/filemtime.xml:1.2 phpdoc-zh/reference/filesystem/functions/filemtime.xml:1.3 --- phpdoc-zh/reference/filesystem/functions/filemtime.xml:1.2 Sun Sep 29 22:55:19 2002 +++ phpdoc-zh/reference/filesystem/functions/filemtime.xml Mon Feb 24 04:12:29 2003 @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <!-- $Author: dallas $ --> -<!-- EN-Revision: 1.2 Maintainer: dallas Status: ready --> +<!-- EN-Revision: 1.4 Maintainer: dallas Status: ready --> <refentry id="function.filemtime"> <refnamediv> <refname>filemtime</refname> @@ -14,21 +14,34 @@ <methodparam><type>string</type><parameter>filename</parameter></methodparam> </methodsynopsis> <para> - ·µ»ØÎļþÉϴα»Ð޸ĵÄʱ¼ä£¬³ö´íʱ·µ»Ø &false;¡£Ê±¼äÒÔ Unix ʱ¼ä´ÁµÄ·½Ê½·µ»Ø¡£ + ·µ»ØÎļþÉϴα»Ð޸ĵÄʱ¼ä£¬³ö´íʱ·µ»Ø &false;¡£Ê±¼äÒÔ Unix ʱ¼ä´ÁµÄ·½Ê½·µ»Ø£¬¿ÉÓÃÓÚ + <function>date</function>¡£ </para> + ¬e.clearstatcache; + ¬e.no-remote; <para> - ±¾º¯ÊýµÄ½á¹û»á±»»º´æ¡£ÏêϸÐÅÏ¢¼û <function>clearstatcache</function>¡£ + ±¾º¯Êý·µ»ØÎļþÖеÄÊý¾Ý¿éÉϴα»Ð´ÈëµÄʱ¼ä£¬Ò²¾ÍÊÇ˵£¬ÎļþµÄÄÚÈÝÉϴα»Ð޸ĵÄʱ¼ä¡£ </para> - <simpara> - ±¾º¯Êý²»ÄÜÓÃÓÚ<link - linkend="features.remote-files">Ô¶³ÌÎļþ</link>£¬±»¼ì²éµÄÎļþ±ØÐëͨ¹ý·þÎñÆ÷µÄÎļþϵͳÀ´·ÃÎÊ¡£ - </simpara> <para> - ×¢Ò⣺±¾º¯Êý·µ»ØÎļþÖеÄÊý¾Ý¿éÉϴα»Ð´ÈëµÄʱ¼ä£¬Ò²¾ÍÊÇ˵£¬ÎļþµÄÄÚÈÝÉϴα»Ð޸ĵÄʱ¼ä¡£¶Ô±¾º¯ÊýµÄ½á¹ûʹÓà - <function>date</function> º¯ÊýÀ´µÃµ½¿É¶ÁµÄÐÞ¸Äʱ¼äÓÃÓÚÒ³ÃæµÄ½Å×¢¡£ + <example> + <title><function>filemtime</function> Àý×Ó</title> + <programlisting role="php"> +<![CDATA[ +<?php +// outputs e.g. somefile.txt was last modified: December 29 2002 22:16:23. +$filename = 'somefile.txt'; +if (file_exists($filename)) { + echo "$filename was last modified: " . date ("F d Y H:i:s.", filemtime($filename)); + +} +?> +]]> + </programlisting> + </example> </para> <para> - ²Î¼û <function>filectime</function> ºÍ <function>touch</function>¡£ + ²Î¼û <function>filectime</function>£¬<function>stat</function>£¬<function>touch</function> + ºÍ <function>getlastmod</function>¡£ </para> </refsect1> </refentry> Index: phpdoc-zh/reference/filesystem/functions/fileowner.xml diff -u phpdoc-zh/reference/filesystem/functions/fileowner.xml:1.2 phpdoc-zh/reference/filesystem/functions/fileowner.xml:1.3 --- phpdoc-zh/reference/filesystem/functions/fileowner.xml:1.2 Sun Sep 29 22:55:19 2002 +++ phpdoc-zh/reference/filesystem/functions/fileowner.xml Mon Feb 24 04:12:29 2003 @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <!-- $Author: dallas $ --> -<!-- EN-Revision: 1.3 Maintainer: dallas Status: ready --> +<!-- EN-Revision: 1.4 Maintainer: dallas Status: ready --> <refentry id="function.fileowner"> <refnamediv> <refname>fileowner</refname> @@ -18,12 +18,10 @@ ID ÒÔÊý×Ö¸ñʽ·µ»Ø£¬Óà <function>posix_getpwuid</function> À´½«Æä½âÎöΪÓû§Ãû¡£ </para> - <para> - ±¾º¯ÊýµÄ½á¹û»á±»»º´æ¡£ÏêϸÐÅÏ¢¼û <function>clearstatcache</function>¡£ - </para> + ¬e.clearstatcache; + ¬e.no-remote; <simpara> - ±¾º¯Êý²»ÄÜÓÃÓÚ<link - linkend="features.remote-files">Ô¶³ÌÎļþ</link>£¬±»¼ì²éµÄÎļþ±ØÐëͨ¹ý·þÎñÆ÷µÄÎļþϵͳÀ´·ÃÎÊ¡£ + ²Î¼û <function>stat</function>¡£ </simpara> </refsect1> </refentry> Index: phpdoc-zh/reference/filesystem/functions/fileperms.xml diff -u phpdoc-zh/reference/filesystem/functions/fileperms.xml:1.2 phpdoc-zh/reference/filesystem/functions/fileperms.xml:1.3 --- phpdoc-zh/reference/filesystem/functions/fileperms.xml:1.2 Sun Sep 29 22:55:19 2002 +++ phpdoc-zh/reference/filesystem/functions/fileperms.xml Mon Feb 24 04:12:29 2003 @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <!-- $Author: dallas $ --> -<!-- EN-Revision: 1.2 Maintainer: dallas Status: ready --> +<!-- EN-Revision: 1.3 Maintainer: dallas Status: ready --> <refentry id="function.fileperms"> <refnamediv> <refname>fileperms</refname> @@ -16,12 +16,10 @@ <para> ·µ»ØÎļþµÄ·ÃÎÊȨÏÞ£¬Èç¹û³ö´íÔò·µ»Ø &false;¡£ </para> - <para> - ±¾º¯ÊýµÄ½á¹û»á±»»º´æ¡£ÏêϸÐÅÏ¢¼û <function>clearstatcache</function>¡£ - </para> + ¬e.clearstatcache; + ¬e.no-remote; <simpara> - ±¾º¯Êý²»ÄÜÓÃÓÚ<link - linkend="features.remote-files">Ô¶³ÌÎļþ</link>£¬±»¼ì²éµÄÎļþ±ØÐëͨ¹ý·þÎñÆ÷µÄÎļþϵͳÀ´·ÃÎÊ¡£ + ²Î¼û <function>is_readable</function> ºÍ <function>stat</function>¡£ </simpara> </refsect1> </refentry> Index: phpdoc-zh/reference/filesystem/functions/filesize.xml diff -u phpdoc-zh/reference/filesystem/functions/filesize.xml:1.2 phpdoc-zh/reference/filesystem/functions/filesize.xml:1.3 --- phpdoc-zh/reference/filesystem/functions/filesize.xml:1.2 Sun Sep 29 22:55:19 2002 +++ phpdoc-zh/reference/filesystem/functions/filesize.xml Mon Feb 24 04:12:30 2003 @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <!-- $Author: dallas $ --> -<!-- EN-Revision: 1.2 Maintainer: dallas Status: ready --> +<!-- EN-Revision: 1.3 Maintainer: dallas Status: ready --> <refentry id="function.filesize"> <refnamediv> <refname>filesize</refname> @@ -16,12 +16,10 @@ <para> ·µ»ØÎļþ´óСµÄ×Ö½ÚÊý£¬Èç¹û³ö´í·µ»Ø &false;¡£ </para> - <para> - ±¾º¯ÊýµÄ½á¹û»á±»»º´æ¡£ÏêϸÐÅÏ¢¼û <function>clearstatcache</function>¡£ - </para> + ¬e.clearstatcache; + ¬e.no-remote; <simpara> - ±¾º¯Êý²»ÄÜÓÃÓÚ<link - linkend="features.remote-files">Ô¶³ÌÎļþ</link>£¬±»¼ì²éµÄÎļþ±ØÐëͨ¹ý·þÎñÆ÷µÄÎļþϵͳÀ´·ÃÎÊ¡£ + ²Î¼û <function>file_exists</function>¡£ </simpara> </refsect1> </refentry> Index: phpdoc-zh/reference/filesystem/functions/filetype.xml diff -u phpdoc-zh/reference/filesystem/functions/filetype.xml:1.3 phpdoc-zh/reference/filesystem/functions/filetype.xml:1.4 --- phpdoc-zh/reference/filesystem/functions/filetype.xml:1.3 Sun Jan 12 07:18:22 2003 +++ phpdoc-zh/reference/filesystem/functions/filetype.xml Mon Feb 24 04:12:31 2003 @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.3 $ --> +<!-- $Revision: 1.4 $ --> <!-- $Author: dallas $ --> -<!-- EN-Revision: 1.6 Maintainer: dallas Status: ready --> +<!-- EN-Revision: 1.7 Maintainer: dallas Status: ready --> <refentry id="function.filetype"> <refnamediv> <refname>filetype</refname> @@ -21,13 +21,8 @@ Èç¹û³ö´íÔò·µ»Ø &false;¡£Èç¹û stat µ÷ÓÃʧ°Ü»òÕßÎļþÀàÐÍδ֪µÄ»° <function>filetype</function> »¹»á²úÉúÒ»¸ö <constant>E_NOTICE</constant> ÏûÏ¢¡£ </para> - <para> - ±¾º¯ÊýµÄ½á¹û»á±»»º´æ¡£ÏêϸÐÅÏ¢¼û <function>clearstatcache</function>¡£ - </para> - <simpara> - ±¾º¯Êý²»ÄÜÓÃÓÚ<link - linkend="features.remote-files">Ô¶³ÌÎļþ</link>£¬±»¼ì²éµÄÎļþ±ØÐëͨ¹ý·þÎñÆ÷µÄÎļþϵͳÀ´·ÃÎÊ¡£ - </simpara> + ¬e.clearstatcache; + ¬e.no-remote; <simpara> ²Î¼û <function>is_dir</function>£¬<function>is_file</function>£¬<function>is_link</function>£¬<function>file_exists</function>