layout only commit

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@75222 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Simone Cortesi 2002-03-25 23:58:19 +00:00
parent 847f7f543a
commit 281c6d10b3

View file

@ -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 @@ if (!copy($file, $file.'.bak')) {
</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 @@ $file = dirname ($path); // $file is set to "/etc"
<programlisting role="php">
<![CDATA[
$df = disk_free_space("/"); // $df contains the number of bytes
// available on "/"
// available on "/"
]]>
</programlisting>
</example>
@ -517,9 +518,7 @@ $df = disk_total_space("/"); // $df contains the total number of
<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 @@ fclose ($fp);
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 @@ fclose ($fd);
<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 @@ $fcontents = implode ('', file ('http://www.php.net/'));
</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 @@ $fcontents = implode ('', file ('http://www.php.net/'));
<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 @@ $fp = fopen ("c:\\data\\info.txt", "r");
<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 @@ fclose ($fd);
<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 @@ luigi florist it
<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 @@ luigi florist it
<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 @@ luigi florist it
</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 @@ luigi florist it
<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 @@ if($fp){
<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 @@ if($fp){
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 @@ if (is_uploaded_file($HTTP_POST_FILES['userfile'])) {
]]>
</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 @@ if (is_uploaded_file($HTTP_POST_FILES['userfile'])) {
</refsect1>
</refentry>
<refentry id="function.link">
<refnamediv>
<refname>link</refname>
@ -2151,6 +2139,7 @@ mkdir ("/path/to/my/dir", 0700);
</refsect1>
</refentry>
<refentry id="function.move-uploaded-file">
<refnamediv>
<refname>move_uploaded_file</refname>
@ -2163,7 +2152,6 @@ mkdir ("/path/to/my/dir", 0700);
<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 @@ mkdir ("/path/to/my/dir", 0700);
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>
&note.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 @@ mkdir ("/path/to/my/dir", 0700);
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 @@ mkdir ("/path/to/my/dir", 0700);
</refsect1>
</refentry>
<refentry id="function.parse-ini-file">
<refnamediv>
<refname>parse_ini_file</refname>
@ -2226,9 +2210,7 @@ mkdir ("/path/to/my/dir", 0700);
<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 @@ Array
</refsect1>
</refentry>
<refentry id="function.pathinfo">
<refnamediv>
<refname>pathinfo</refname>
@ -2377,6 +2360,7 @@ html
</refsect1>
</refentry>
<refentry id="function.pclose">
<refnamediv>
<refname>pclose</refname>
@ -2406,6 +2390,7 @@ html
</refsect1>
</refentry>
<refentry id="function.popen">
<refnamediv>
<refname>popen</refname>
@ -2481,9 +2466,7 @@ pclose($fp);
<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 @@ pclose($fp);
</para>
<para>
See also <function>is_link</function>,
<function>symlink</function> and
<function>symlink</function>, and
<function>linkinfo</function>.
</para>
&note.no-windows;
@ -2588,8 +2571,13 @@ pclose($fp);
</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 @@ unlink($tmpfname);
</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 @@ fclose($temp); // this removes the file
<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 @@ vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->