cortesi Mon Mar 25 18:58:19 2002 EDT Modified files: /phpdoc/en/functions filesystem.xml Log: layout only commit
Index: phpdoc/en/functions/filesystem.xml diff -u phpdoc/en/functions/filesystem.xml:1.132 phpdoc/en/functions/filesystem.xml:1.133 --- phpdoc/en/functions/filesystem.xml:1.132 Mon Mar 25 08:06:07 2002 +++ phpdoc/en/functions/filesystem.xml Mon Mar 25 18:58:19 2002 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.132 $ --> +<!-- $Revision: 1.133 $ --> <reference id="ref.filesystem"> <title>Filesystem functions</title> <titleabbrev>Filesystem</titleabbrev> @@ -288,7 +288,8 @@ </methodsynopsis> <para> Given a string containing a path to a file, this function will - return the name of the directory.</para> + return the name of the directory. + </para> <para> On Windows, both slash (<literal>/</literal>) and backslash (<literal>\</literal>) are used as path separator character. In @@ -347,7 +348,7 @@ <programlisting role="php"> <![CDATA[ $df = disk_free_space("/"); // $df contains the number of bytes - // available on "/" + // available on "/" ]]> </programlisting> </example> @@ -517,9 +518,7 @@ <type>array</type><methodname>fgetcsv</methodname> <methodparam><type>int</type><parameter>fp</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>delimiter</parameter></methodparam> </methodsynopsis> <simpara> Similar to <function>fgets</function> except that @@ -586,7 +585,7 @@ Returns a string of up to length - 1 bytes read from the file pointed to by fp. Reading ends when length - 1 bytes have been read, on a newline (which is included in the return value), or on - EOF (whichever comes first). If no length is specified, the length + EOF (whichever comes first). f no length is specified, the length defaults to 1k, or 1024 bytes. </para> <para> @@ -646,9 +645,7 @@ <type>string</type><methodname>fgetss</methodname> <methodparam><type>int</type><parameter>fp</parameter></methodparam> <methodparam><type>int</type><parameter>length</parameter></methodparam> - <methodparam choice="opt"><type>string</type><parameter> - allowable_tags - </parameter></methodparam> + <methodparam +choice="opt"><type>string</type><parameter>allowable_tags</parameter></methodparam> </methodsynopsis> <para> Identical to <function>fgets</function>, except that fgetss @@ -1049,8 +1046,10 @@ </methodsynopsis> <para> Returns the type of the file. Possible values are fifo, char, - dir, block, link, file, and unknown.</para> <para> Returns &false; - if an error occurs. + dir, block, link, file, and unknown. + </para> + <para> + Returns &false; if an error occurs. </para> <para> The results of this function are cached. See @@ -1075,9 +1074,7 @@ <type>bool</type><methodname>flock</methodname> <methodparam><type>int</type><parameter>fp</parameter></methodparam> <methodparam><type>int</type><parameter>operation</parameter></methodparam> - <methodparam choice="opt"><type>int</type><parameter> - wouldblock - </parameter></methodparam> + <methodparam +choice="opt"><type>int</type><parameter>wouldblock</parameter></methodparam> </methodsynopsis> <simpara> PHP supports a portable way of locking complete files in an @@ -1409,9 +1406,7 @@ <type>int</type><methodname>fputs</methodname> <methodparam><type>int</type><parameter>fp</parameter></methodparam> <methodparam><type>string</type><parameter>str</parameter></methodparam> - <methodparam choice="opt"><type>int</type><parameter> - length - </parameter></methodparam> + <methodparam +choice="opt"><type>int</type><parameter>length</parameter></methodparam> </methodsynopsis> <para> <function>fputs</function> is an alias to @@ -1509,7 +1504,7 @@ <example> <title><function>fscanf</function> Example</title> <programlisting role="php"> -<![CDATA[ + <![CDATA[ $fp = fopen ("users.txt","r"); while ($userinfo = fscanf ($fp, "%s\t%s\t%s\n")) { list ($name, $profession, $countrycode) = $userinfo; @@ -1560,18 +1555,15 @@ <parameter>whence</parameter>, whose values are defined as follows: <simplelist> - <member>SEEK_SET - Set position equal to - <parameter>offset</parameter> bytes.</member> <member>SEEK_CUR - - Set position to current location plus - <parameter>offset</parameter>.</member> <member>SEEK_END - Set - position to end-of-file plus - <parameter>offset</parameter>. (To move to a position before the - end-of-file, you need to pass a negative value in - <parameter>offset</parameter>.)</member> + <member>SEEK_SET - Set position equal to <parameter>offset</parameter> +bytes.</member> + <member>SEEK_CUR - Set position to current location plus +<parameter>offset</parameter>.</member> + <member>SEEK_END - Set position to end-of-file plus +<parameter>offset</parameter>. + (To move to a position before the end-of-file, you need to pass a negative + value in <parameter>offset</parameter>.)</member> </simplelist> </para> - <para>If <parameter>whence is not specified, it is assumed to be - SEEK_SET.</parameter> + <para>If <parameter>whence</parameter> is not specified, it is assumed to be + SEEK_SET. </para> <para> Upon success, returns 0; otherwise, returns -1. Note that seeking @@ -1628,8 +1620,9 @@ <listitem><simpara>blocksize for filesystem I/O *</simpara></listitem> <listitem><simpara>number of blocks allocated</simpara></listitem> </orderedlist> - * - only valid on systems supporting the st_blksize type--other - systems (i.e. Windows) return -1</para> + * - only valid on systems supporting the st_blksize type--other + systems (i.e. Windows) return -1 + </para> <para> The results of this function are cached. See <function>clearstatcache</function> for more details. @@ -1662,7 +1655,7 @@ </para> <para> See also <function>fopen</function>, <function>popen</function>, - <function>fseek</function> and <function>rewind</function>. + <function>fseek</function>, and <function>rewind</function>. </para> </refsect1> </refentry> @@ -1698,9 +1691,7 @@ <type>int</type><methodname>fwrite</methodname> <methodparam><type>int</type><parameter>fp</parameter></methodparam> <methodparam><type>string</type><parameter>string</parameter></methodparam> - <methodparam choice="opt"><type>int</type><parameter> - length - </parameter></methodparam> + <methodparam +choice="opt"><type>int</type><parameter>length</parameter></methodparam> </methodsynopsis> <simpara> <function>fwrite</function> writes the contents of @@ -2003,7 +1994,6 @@ <type>bool</type><methodname>is_uploaded_file</methodname> <methodparam><type>string</type><parameter>filename</parameter></methodparam> </methodsynopsis> - <para> Returns &true; if the file named by <varname>filename</varname> was uploaded via HTTP POST. This is useful to help ensure that a @@ -2011,14 +2001,12 @@ files upon which it should not be working--for instance, <filename>/etc/passwd</filename>. </para> - <para> This sort of check is especially important if there is any chance that anything done with uploaded files could reveal their contents to the user, or even to other users on the same system. </para> - <para> <function>is_uploaded_file</function> is available only in versions of PHP 3 after PHP 3.0.16, and in versions of PHP 4 @@ -2055,7 +2043,6 @@ ]]> </programlisting> </para> - <para> See also <function>move_uploaded_file</function>, and the section <link linkend="features.file-upload">Handling file uploads</link> @@ -2064,6 +2051,7 @@ </refsect1> </refentry> + <refentry id="function.link"> <refnamediv> <refname>link</refname> @@ -2151,6 +2139,7 @@ </refsect1> </refentry> + <refentry id="function.move-uploaded-file"> <refnamediv> <refname>move_uploaded_file</refname> @@ -2163,7 +2152,6 @@ <methodparam><type>string</type><parameter>filename</parameter></methodparam> <methodparam><type>string</type><parameter>destination</parameter></methodparam> </methodsynopsis> - <para> This function checks to ensure that the file designated by <parameter>filename</parameter> is a valid upload file (meaning @@ -2171,29 +2159,26 @@ the file is valid, it will be moved to the filename given by <parameter>destination</parameter>. </para> - <para> If <parameter>filename</parameter> is not a valid upload file, then no action will occur, and <function>move_uploaded_file</function> will return &false;. </para> - <para> If <parameter>filename</parameter> is a valid upload file, but cannot be moved for some reason, no action will occur, and <function>move_uploaded_file</function> will return &false;. Additionally, a warning will be issued. </para> - <para> This sort of check is especially important if there is any chance that anything done with uploaded files could reveal their contents to the user, or even to other users on the same system. </para> - - <note> + ¬e.sm.uidcheck; + <note> <para> <function>move_uploaded_file</function> is not affected by the normal safe-mode UID-restrictions. This is not unsafe because @@ -2201,13 +2186,11 @@ via PHP. </para> </note> - <warning> <para> If the destination file already exists, it will be overwritten. </para> </warning> - <para> See also <function>is_uploaded_file</function>, and the section <link linkend="features.file-upload">Handling file uploads</link> @@ -2216,6 +2199,7 @@ </refsect1> </refentry> + <refentry id="function.parse-ini-file"> <refnamediv> <refname>parse_ini_file</refname> @@ -2226,9 +2210,7 @@ <methodsynopsis> <type>array</type><methodname>parse_ini_file</methodname> <methodparam><type>string</type><parameter>filename</parameter></methodparam> - <methodparam choice="opt"><type>bool</type><parameter> - process_sections - </parameter></methodparam> + <methodparam +choice="opt"><type>bool</type><parameter>process_sections</parameter></methodparam> </methodsynopsis> <para> <function>parse_ini_file</function> loads in the @@ -2321,6 +2303,7 @@ </refsect1> </refentry> + <refentry id="function.pathinfo"> <refnamediv> <refname>pathinfo</refname> @@ -2377,6 +2360,7 @@ </refsect1> </refentry> + <refentry id="function.pclose"> <refnamediv> <refname>pclose</refname> @@ -2406,6 +2390,7 @@ </refsect1> </refentry> + <refentry id="function.popen"> <refnamediv> <refname>popen</refname> @@ -2481,9 +2466,7 @@ <methodsynopsis> <type>int</type><methodname>readfile</methodname> <methodparam><type>string</type><parameter>filename</parameter></methodparam> - <methodparam choice="opt"><type>int</type><parameter> - use_include_path - </parameter></methodparam> + <methodparam +choice="opt"><type>int</type><parameter>use_include_path</parameter></methodparam> </methodsynopsis> <para> Reads a file and writes it to standard output. @@ -2546,7 +2529,7 @@ </para> <para> See also <function>is_link</function>, - <function>symlink</function> and + <function>symlink</function>, and <function>linkinfo</function>. </para> ¬e.no-windows; @@ -2588,8 +2571,13 @@ </methodsynopsis> <para> Sets the file position indicator for fp to the beginning of the - file stream.</para> <para> If an error occurs, returns 0.</para> - <para> The file pointer must be valid, and must point to a file + file stream. + </para> + <para> + If an error occurs, returns 0. + </para> + <para> + The file pointer must be valid, and must point to a file successfully opened by <function>fopen</function>. </para> <note> @@ -2844,7 +2832,7 @@ </simpara> </note> <para> - See also <function>tmpfile</function>, <function>unlink</function>. + See also <function>tmpfile</function> and <function>unlink</function>. </para> </refsect1> </refentry> @@ -2901,9 +2889,7 @@ <methodsynopsis> <type>int</type><methodname>touch</methodname> <methodparam><type>string</type><parameter>filename</parameter></methodparam> - <methodparam choice="opt"><type>int</type><parameter> - time - </parameter></methodparam> + <methodparam +choice="opt"><type>int</type><parameter>time</parameter></methodparam> </methodsynopsis> <para> Attempts to set the access and modification time of the file named by @@ -3003,4 +2989,3 @@ vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> -