A lot of cosmetic changes.

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@30332 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Egon Schmid 2000-08-15 21:19:54 +00:00
parent 969d3d2633
commit 2395b71a42

View file

@ -6,7 +6,7 @@
<refnamediv>
<refname>basename</refname>
<refpurpose>
Return filename component of path
Returns filename component of path
</refpurpose>
</refnamediv>
<refsect1>
@ -32,7 +32,7 @@
<title><function>basename</function> example</title>
<programlisting role="php">
$path = "/home/httpd/html/index.php3";
$file = basename($path); // $file is set to "index.php3"
$file = basename ($path); // $file is set to "index.php3"
</programlisting>
</example>
</para>
@ -45,7 +45,7 @@ $file = basename($path); // $file is set to "index.php3"
<refentry id="function.chgrp">
<refnamediv>
<refname>chgrp</refname>
<refpurpose>Change file group</refpurpose>
<refpurpose>Changes file group</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
@ -58,9 +58,10 @@ $file = basename($path); // $file is set to "index.php3"
</funcsynopsis>
<para>
Attempts to change the group of the file
<parameter>filename</parameter> to <parameter>group</parameter>. Only the
superuser may change the group of a file arbitrarily; other users may change
the group of a file to any group of which that user is a member.
<parameter>filename</parameter> to
<parameter>group</parameter>. Only the superuser may change the
group of a file arbitrarily; other users may change the group of
a file to any group of which that user is a member.
</para>
<para>
Returns true on success; otherwise returns false.
@ -71,7 +72,7 @@ $file = basename($path); // $file is set to "index.php3"
</para>
<note>
<simpara>
This function does not work on Windows systems
This function does not work on Windows systems
</simpara>
</note>
</refsect1>
@ -80,7 +81,7 @@ $file = basename($path); // $file is set to "index.php3"
<refentry id="function.chmod">
<refnamediv>
<refname>chmod</refname>
<refpurpose>Change file mode</refpurpose>
<refpurpose>Changes file mode</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
@ -103,8 +104,8 @@ $file = basename($path); // $file is set to "index.php3"
you need to prefix <parameter>mode</parameter> with a zero (0):
<informalexample>
<programlisting role="php">
chmod( "/somedir/somefile", 755 ); // decimal; probably incorrect
chmod( "/somedir/somefile", 0755 ); // octal; correct value of mode
chmod ("/somedir/somefile", 755); // decimal; probably incorrect
chmod ("/somedir/somefile", 0755); // octal; correct value of mode
</programlisting>
</informalexample>
</para>
@ -117,7 +118,7 @@ chmod( "/somedir/somefile", 0755 ); // octal; correct value of mode
</para>
<note>
<simpara>
This function does not work on Windows systems
This function does not work on Windows systems
</simpara>
</note>
</refsect1>
@ -126,7 +127,7 @@ chmod( "/somedir/somefile", 0755 ); // octal; correct value of mode
<refentry id="function.chown">
<refnamediv>
<refname>chown</refname>
<refpurpose>change file owner</refpurpose>
<refpurpose>Changes file owner</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
@ -159,7 +160,7 @@ chmod( "/somedir/somefile", 0755 ); // octal; correct value of mode
<refentry id="function.clearstatcache">
<refnamediv>
<refname>clearstatcache</refname>
<refpurpose>Clear file stat cache</refpurpose>
<refpurpose>Clears file stat cache</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
@ -208,7 +209,7 @@ chmod( "/somedir/somefile", 0755 ); // octal; correct value of mode
<refentry id="function.copy">
<refnamediv>
<refname>copy</refname>
<refpurpose>Copy file</refpurpose>
<refpurpose>Copies file</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
@ -223,10 +224,10 @@ chmod( "/somedir/somefile", 0755 ); // octal; correct value of mode
Makes a copy of a file. Returns true if the copy succeeded,
false otherwise.
<example>
<title><function>copy</function> example</title>
<title><function>Copy</function> example</title>
<programlisting role="php">
if ( !copy($file, $file.'.bak') ) {
print("failed to copy $file...&lt;br>\n");
if (!copy($file, $file.'.bak')) {
print ("failed to copy $file...&lt;br>\n");
}
</programlisting>
</example>
@ -250,13 +251,14 @@ if ( !copy($file, $file.'.bak') ) {
<paramdef>string <parameter>file</parameter></paramdef>
</funcprototype>
</funcsynopsis>
<para>
This is a dummy manual entry to satisfy those people who are
looking for <function>unlink</function> or
<function>unset</function> in the wrong place.</para>
<para>
See also: <function>unlink</function> to delete files,
<function>unset</function> to delete variables.
<para>
This is a dummy manual entry to satisfy those people who are
looking for <function>unlink</function> or
<function>unset</function> in the wrong place.
</para>
<para>
See also: <function>unlink</function> to delete files,
<function>unset</function> to delete variables.
</para>
</refsect1>
</refentry>
@ -264,7 +266,7 @@ if ( !copy($file, $file.'.bak') ) {
<refentry id="function.dirname">
<refnamediv>
<refname>dirname</refname>
<refpurpose>Return directory name component of path</refpurpose>
<refpurpose>Returns directory name component of path</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
@ -284,10 +286,10 @@ if ( !copy($file, $file.'.bak') ) {
(<literal>/</literal>).</para>
<para>
<example>
<title><function>dirname</function> example</title>
<title><function>Dirname</function> example</title>
<programlisting role="php">
$path = "/etc/passwd";
$file = dirname($path); // $file is set to "/etc"
$file = dirname ($path); // $file is set to "/etc"
</programlisting>
</example>
</para>
@ -300,7 +302,7 @@ $file = dirname($path); // $file is set to "/etc"
<refentry id="function.diskfreespace">
<refnamediv>
<refname>diskfreespace</refname>
<refpurpose>Return available space in directory</refpurpose>
<refpurpose>Returns available space in directory</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
@ -330,7 +332,7 @@ $df = diskfreespace("/"); // $df contains the number of bytes
<refentry id="function.fclose">
<refnamediv>
<refname>fclose</refname>
<refpurpose>Close an open file pointer</refpurpose>
<refpurpose>Closes an open file pointer</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
@ -357,7 +359,7 @@ $df = diskfreespace("/"); // $df contains the number of bytes
<refentry id="function.feof">
<refnamediv>
<refname>feof</refname>
<refpurpose>Test for end-of-file on a file pointer</refpurpose>
<refpurpose>Tests for end-of-file on a file pointer</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
@ -382,7 +384,7 @@ $df = diskfreespace("/"); // $df contains the number of bytes
<refentry id="function.fgetc">
<refnamediv>
<refname>fgetc</refname>
<refpurpose>Get character from file pointer</refpurpose>
<refpurpose>Gets character from file pointer</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
@ -413,7 +415,7 @@ $df = diskfreespace("/"); // $df contains the number of bytes
<refnamediv>
<refname>fgetcsv</refname>
<refpurpose>
Get line from file pointer and parse for CSV fields
Gets line from file pointer and parse for CSV fields
</refpurpose>
</refnamediv>
<refsect1>
@ -431,22 +433,24 @@ $df = diskfreespace("/"); // $df contains the number of bytes
</funcprototype>
</funcsynopsis>
<simpara>
Similar to fgets() except that fgetcsv() parses the line it reads
for fields in CSV format and returns an array containing the
fields read. The field delimiter is a comma, unless you specifiy
another delimiter with the optional third parameter.
Similar to <function>fgets</function> except that
<function>fgetcsv</function> parses the line it reads for fields
in <acronym>CSV</acronym> format and returns an array containing
the fields read. The field delimiter is a comma, unless you
specifiy another delimiter with the optional third parameter.
</simpara>
<simpara>
fp must be a valid file pointer to a file successfully opened by
<function>fopen</function>, <function>popen</function>, or
<function>fsockopen</function>
<parameter>Fp</parameter> must be a valid file pointer to a file
successfully opened by <function>fopen</function>,
<function>popen</function>, or <function>fsockopen</function>
</simpara>
<simpara>
length must be greater than the longest line to be found in the
Length must be greater than the longest line to be found in the
CSV file (allowing for trailing line-end characters).
</simpara>
<simpara>
fgetcsv() returns false on error, including end of file.
<function>Fgetcsv</function> returns false on error, including
end of file.
</simpara>
<simpara>
NB A blank line in a CSV file will be returned as an array
@ -478,7 +482,7 @@ fclose ($fp);
<refentry id="function.fgets">
<refnamediv>
<refname>fgets</refname>
<refpurpose>Get line from file pointer</refpurpose>
<refpurpose>Gets line from file pointer</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
@ -517,7 +521,7 @@ fclose ($fp);
<title>Reading a file line by line</title>
<programlisting role="php">
$fd = fopen ("/tmp/inputfile.txt", "r");
while (!feof($fd)) {
while (!feof ($fd)) {
$buffer = fgets($fd, 4096);
echo $buffer;
}
@ -537,7 +541,7 @@ fclose ($fd);
<refnamediv>
<refname>fgetss</refname>
<refpurpose>
Get line from file pointer and strip HTML tags
Gets line from file pointer and strip HTML tags
</refpurpose>
</refnamediv>
<refsect1>
@ -577,11 +581,10 @@ fclose ($fd);
</refsect1>
</refentry>
<refentry id="function.file">
<refnamediv>
<refname>file</refname>
<refpurpose>read entire file into an array</refpurpose>
<refpurpose>Reads entire file into an array</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
@ -594,37 +597,33 @@ fclose ($fd);
</paramdef>
</funcprototype>
</funcsynopsis>
<para>
Identical to <function>readfile</function>, except that
<function>file</function> returns the file in an array. Each
element of the array corresponds to a line in the file, with the
newline still attached.
</para>
<para>
You can use the optional second parameter and set it to "1", if
you want to search for the file in the <link
linkend="ini.include-path">include_path</link>, too.
</para>
<para>
<informalexample>
<programlisting>
<programlisting role="php">
&lt;?php
// get a web page into an array and print it out
$fcontents = file( 'http://www.php.net' );
while ( list( $line_num, $line ) = each( $fcontents ) ) {
echo "&lt;b&gt;Line $line_num:&lt;/b&gt; " . htmlspecialchars( $line ) . "&lt;br&gt;\n";
$fcontents = file ('http://www.php.net');
while (list ($line_num, $line) = each ($fcontents)) {
echo "&lt;b&gt;Line $line_num:&lt;/b&gt; " . htmlspecialchars ($line) . "&lt;br&gt;\n";
}
// get a web page into a string
$fcontents = join( '', file( 'http://www.php.net' ) );
$fcontents = join ('', file ('http://www.php.net'));
?&gt;
</programlisting>
</informalexample>
</para>
<para>
See also <function>readfile</function>,
<function>fopen</function>, and <function>popen</function>.
@ -636,7 +635,7 @@ $fcontents = join( '', file( 'http://www.php.net' ) );
<refentry id="function.file-exists">
<refnamediv>
<refname>file_exists</refname>
<refpurpose>Check whether a file exists</refpurpose>
<refpurpose>Checks whether a file exists</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
@ -646,23 +645,19 @@ $fcontents = join( '', file( 'http://www.php.net' ) );
<paramdef>string <parameter>filename</parameter></paramdef>
</funcprototype>
</funcsynopsis>
<simpara>
Returns true if the file specified by
<parameter>filename</parameter> exists; false otherwise.
</simpara>
<simpara>
<function>file_exists</function> will not work on remote files;
the file to be examined must be accessible via the server's
filesystem.
</simpara>
<simpara>
The results of this function are cached. See
<function>clearstatcache</function> for more details.
</simpara>
</refsect1>
</refentry>
@ -670,7 +665,7 @@ $fcontents = join( '', file( 'http://www.php.net' ) );
<refentry id="function.fileatime">
<refnamediv>
<refname>fileatime</refname>
<refpurpose>Get last access time of file</refpurpose>
<refpurpose>Gets last access time of file</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
@ -680,17 +675,14 @@ $fcontents = join( '', file( 'http://www.php.net' ) );
<paramdef>string <parameter>filename</parameter></paramdef>
</funcprototype>
</funcsynopsis>
<simpara>
Returns the time the file was last accessed, or false in case of
an error. The time is returned as a Unix timestamp.
</simpara>
<simpara>
The results of this function are cached. See
<function>clearstatcache</function> for more details.
</simpara>
<simpara>
Note: The atime of a file is supposed to change whenever
the data blocks of a file are being read. This can be
@ -701,15 +693,13 @@ $fcontents = join( '', file( 'http://www.php.net' ) );
news spools are a common example. On such filesystems
this function will be useless.
</simpara>
</refsect1>
</refentry>
<refentry id="function.filectime">
<refnamediv>
<refname>filectime</refname>
<refpurpose>Get inode change time of file</refpurpose>
<refpurpose>Gets inode change time of file</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
@ -731,9 +721,9 @@ $fcontents = join( '', file( 'http://www.php.net' ) );
changed, when it's Inode data is changed, that is, when
the permissions, the owner, the group or other metadata
from the Inode is written to. See also
<function>filemtime()</function> (this is what you want to use
<function>filemtime</function> (this is what you want to use
when you want to create "Last Modified" footers on web pages) and
<function>fileatime()</function>.
<function>fileatime</function>.
</para>
<para>Note: In some Unix texts the ctime of a file is being
referred to as the creation time of the file. This is wrong.
@ -746,7 +736,7 @@ $fcontents = join( '', file( 'http://www.php.net' ) );
<refentry id="function.filegroup">
<refnamediv>
<refname>filegroup</refname>
<refpurpose>Get file group</refpurpose>
<refpurpose>Gets file group</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
@ -776,7 +766,7 @@ $fcontents = join( '', file( 'http://www.php.net' ) );
<refentry id="function.fileinode">
<refnamediv>
<refname>fileinode</refname>
<refpurpose>Get file inode</refpurpose>
<refpurpose>Gets file inode</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
@ -804,7 +794,7 @@ $fcontents = join( '', file( 'http://www.php.net' ) );
<refentry id="function.filemtime">
<refnamediv>
<refname>filemtime</refname>
<refpurpose>Get file modification time</refpurpose>
<refpurpose>Gets file modification time</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
@ -825,7 +815,7 @@ $fcontents = join( '', file( 'http://www.php.net' ) );
<para>Note: This function returns the time when the data
blocks of a file were being written to, that is, the time
when the content of the file was changed. Use
<function>date()</function> on the result of this function
<function>date</function> on the result of this function
to get a printable modification date for use in page footers.
</para>
</refsect1>
@ -834,7 +824,7 @@ $fcontents = join( '', file( 'http://www.php.net' ) );
<refentry id="function.fileowner">
<refnamediv>
<refname>fileowner</refname>
<refpurpose>Get file owner</refpurpose>
<refpurpose>Gets file owner</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
@ -864,7 +854,7 @@ $fcontents = join( '', file( 'http://www.php.net' ) );
<refentry id="function.fileperms">
<refnamediv>
<refname>fileperms</refname>
<refpurpose>Get file permissions</refpurpose>
<refpurpose>Gets file permissions</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
@ -887,7 +877,7 @@ $fcontents = join( '', file( 'http://www.php.net' ) );
<refentry id="function.filesize">
<refnamediv>
<refname>filesize</refname>
<refpurpose>Get file size</refpurpose>
<refpurpose>Gets file size</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
@ -910,7 +900,7 @@ $fcontents = join( '', file( 'http://www.php.net' ) );
<refentry id="function.filetype">
<refnamediv>
<refname>filetype</refname>
<refpurpose>Get file type</refpurpose>
<refpurpose>Gets file type</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
@ -967,37 +957,42 @@ $fcontents = join( '', file( 'http://www.php.net' ) );
<listitem>
<simpara>
To acquire a shared lock (reader), set
<parameter>operation</parameter> to LOCK_SH (set to 1 prior to PHP 4.0.1).
<parameter>operation</parameter> to LOCK_SH (set to 1 prior to
PHP 4.0.1).
</simpara>
</listitem>
<listitem>
<simpara>
To acquire an exclusive lock (writer), set
<parameter>operation</parameter> to LOCK_EX (set to 2 prior to PHP 4.0.1).
<parameter>operation</parameter> to LOCK_EX (set to 2 prior to
PHP 4.0.1).
</simpara>
</listitem>
<listitem>
<simpara>
To release a lock (shared or exclusive), set
<parameter>operation</parameter> to LOCK_UN (set to 3 prior to PHP 4.0.1).
<parameter>operation</parameter> to LOCK_UN (set to 3 prior to
PHP 4.0.1).
</simpara>
</listitem>
<listitem>
<simpara>
If you don't want <function>flock</function> to block while
locking, add LOCK_NB (4 prior to PHP 4.0.1) to <parameter>operation</parameter>.
locking, add LOCK_NB (4 prior to PHP 4.0.1) to
<parameter>operation</parameter>.
</simpara>
</listitem>
</itemizedlist>
</para>
<simpara>
<function>flock</function> allows you to perform a simple
<function>Flock</function> allows you to perform a simple
reader/writer model which can be used on virtually every platform
(including most Unices and even Windows). The optional 3rd argument
is set to true if the lock would block (EWOULDBLOCK errno condition)
(including most Unices and even Windows). The optional 3rd
argument is set to true if the lock would block (EWOULDBLOCK
errno condition)
</simpara>
<simpara>
<function>flock</function> returns true on success and false on
<function>Flock</function> returns true on success and false on
error (e.g. when a lock could not be acquired).
</simpara>
</refsect1>
@ -1006,7 +1001,7 @@ $fcontents = join( '', file( 'http://www.php.net' ) );
<refentry id="function.fopen">
<refnamediv>
<refname>fopen</refname>
<refpurpose>Open file or URL</refpurpose>
<refpurpose>Opens file or URL</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
@ -1111,11 +1106,11 @@ $fcontents = join( '', file( 'http://www.php.net' ) );
</para>
<para>
<example>
<title>fopen() example</title>
<title><function>Fopen</function> example</title>
<programlisting role="php">
$fp = fopen("/home/rasmus/file.txt", "r");
$fp = fopen("http://www.php.net/", "r");
$fp = fopen("ftp://user:password@example.com/", "w");
$fp = fopen ("/home/rasmus/file.txt", "r");
$fp = fopen ("http://www.php.net/", "r");
$fp = fopen ("ftp://user:password@example.com/", "w");
</programlisting>
</example>
</para>
@ -1130,7 +1125,7 @@ $fp = fopen("ftp://user:password@example.com/", "w");
used in the path to the file, or use forward slashes.
<informalexample>
<programlisting role="php">
$fp = fopen("c:\\data\\info.txt", "r");
$fp = fopen ("c:\\data\\info.txt", "r");
</programlisting>
</informalexample>
</para>
@ -1187,7 +1182,7 @@ $fp = fopen("c:\\data\\info.txt", "r");
<refentry id="function.fputs">
<refnamediv>
<refname>fputs</refname>
<refpurpose>Write to a file pointer</refpurpose>
<refpurpose>Writes to a file pointer</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
@ -1204,7 +1199,7 @@ $fp = fopen("c:\\data\\info.txt", "r");
</funcprototype>
</funcsynopsis>
<para>
<function>fputs</function> is an alias to
<function>Fputs</function> is an alias to
<function>fwrite</function>, and is identical in every way. Note
that the <parameter>length</parameter> parameter is optional and
if not specified the entire string will be written.
@ -1227,7 +1222,7 @@ $fp = fopen("c:\\data\\info.txt", "r");
</funcprototype>
</funcsynopsis>
<simpara>
<function>fread</function> reads up to
<function>Fread</function> reads up to
<parameter>length</parameter> bytes from the file pointer
referenced by <parameter>fp</parameter>. Reading stops when
<parameter>length</parameter> bytes have been read or EOF is
@ -1248,8 +1243,8 @@ fclose ($fd);
See also <function>fwrite</function>, <function>fopen</function>,
<function>fsockopen</function>, <function>popen</function>,
<function>fgets</function>, <function>fgetss</function>,
<function>fscanf</function>,
<function>file</function>, and <function>fpassthru</function>.
<function>fscanf</function>, <function>file</function>, and
<function>fpassthru</function>.
</simpara>
</refsect1>
</refentry>
@ -1272,40 +1267,40 @@ fclose ($fd);
</funcprototype>
</funcsynopsis>
<para>
The function <function>fscanf</function> is similar to
<function>sscanf</function>, but it takes its input from a file
associated with <parameter>handle</parameter> and interprets the input
according to the specified <parameter>format</parameter>. If only two
parameters were passed to this function, the values parsed will be
returned as an array. Otherwise, if optional parameters are passed, the
function will return the number of assigned values. The optional
parameters must be passed by reference.
<example>
<title><function>Fscanf</function> Example</title>
<programlisting role="php">
$fp = fopen("users.txt","r");
while ($userinfo = fscanf($fp,"%s\t%s\t%s\n")) {
list($name, $profession, $countrycode) = $userinfo;
//... do something with the values
The function <function>fscanf</function> is similar to
<function>sscanf</function>, but it takes its input from a file
associated with <parameter>handle</parameter> and interprets the
input according to the specified
<parameter>format</parameter>. If only two parameters were passed
to this function, the values parsed will be returned as an array.
Otherwise, if optional parameters are passed, the function will
return the number of assigned values. The optional parameters
must be passed by reference.
<example>
<title><function>Fscanf</function> Example</title>
<programlisting role="php">
$fp = fopen ("users.txt","r");
while ($userinfo = fscanf ($fp, "%s\t%s\t%s\n")) {
list ($name, $profession, $countrycode) = $userinfo;
//... do something with the values
}
fclose($fp);
</programlisting>
</example>
<example>
<title>users.txt</title>
<programlisting>
javier argonaut pe
hiroshi sculptor jp
robert slacker us
luigi florist it
</programlisting>
</example>
</programlisting>
</example>
<example>
<title>users.txt</title>
<programlisting>
javier argonaut pe
hiroshi sculptor jp
robert slacker us
luigi florist it
</programlisting>
</example>
</para>
<para>
See also <function>fread</function>,
<function>fgets</function>, <function>fgetss</function>,
<function>sscanf</function>, <function>printf</function>,
and <function>sprintf</function>.
See also <function>fread</function>, <function>fgets</function>,
<function>fgetss</function>, <function>sscanf</function>,
<function>printf</function>, and <function>sprintf</function>.
</para>
</refsect1>
</refentry>
@ -1313,7 +1308,7 @@ luigi florist it
<refentry id="function.fseek">
<refnamediv>
<refname>fseek</refname>
<refpurpose>Seek on a file pointer</refpurpose>
<refpurpose>Seeks on a file pointer</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
@ -1322,7 +1317,9 @@ luigi florist it
<funcdef>int <function>fseek</function></funcdef>
<paramdef>int <parameter>fp</parameter></paramdef>
<paramdef>int <parameter>offset</parameter></paramdef>
<paramdef>int <parameter><optional>whence</optional></parameter></paramdef>
<paramdef>int
<parameter><optional>whence</optional></parameter>
</paramdef>
</funcprototype>
</funcsynopsis>
<para>
@ -1354,10 +1351,10 @@ luigi florist it
formats.
</para>
<note>
<para>
<para>
The <parameter>whence</parameter> argument was added after PHP 4.0 RC1.
</para>
</note>
</para>
</note>
<para>
See also <function>ftell</function> and
<function>rewind</function>.
@ -1369,7 +1366,7 @@ luigi florist it
<refnamediv>
<refname>fstat</refname>
<refpurpose>
Get information about a file using an open file pointer.
Gets information about a file using an open file pointer
</refpurpose>
</refnamediv>
<refsect1>
@ -1415,7 +1412,7 @@ luigi florist it
<refentry id="function.ftell">
<refnamediv>
<refname>ftell</refname>
<refpurpose>Tell file pointer read/write position</refpurpose>
<refpurpose>Tells file pointer read/write position</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
@ -1448,7 +1445,7 @@ luigi florist it
<refnamediv>
<refname>ftruncate</refname>
<refpurpose>
Truncate a file to a given length.
Truncates a file to a given length.
</refpurpose>
</refnamediv>
<refsect1>
@ -1762,7 +1759,7 @@ luigi florist it
<refentry id="function.linkinfo">
<refnamediv>
<refname>linkinfo</refname>
<refpurpose>Get information about a link</refpurpose>
<refpurpose>Gets information about a link</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
@ -1795,7 +1792,7 @@ luigi florist it
<refentry id="function.mkdir">
<refnamediv>
<refname>mkdir</refname>
<refpurpose>Make directory</refpurpose>
<refpurpose>Makes directory</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
@ -1830,7 +1827,7 @@ mkdir ("/path/to/my/dir", 0700);
<refentry id="function.pclose">
<refnamediv>
<refname>pclose</refname>
<refpurpose>Close process file pointer</refpurpose>
<refpurpose>Closes process file pointer</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
@ -1861,7 +1858,7 @@ mkdir ("/path/to/my/dir", 0700);
<refentry id="function.popen">
<refnamediv>
<refname>popen</refname>
<refpurpose>Open process file pointer</refpurpose>
<refpurpose>Opens process file pointer</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
@ -1903,7 +1900,7 @@ $fp = popen ("/bin/ls", "r");
<refentry id="function.readfile">
<refnamediv>
<refname>readfile</refname>
<refpurpose>Output a file</refpurpose>
<refpurpose>Outputs a file</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
@ -1964,7 +1961,7 @@ $fp = popen ("/bin/ls", "r");
<refentry id="function.readlink">
<refnamediv>
<refname>readlink</refname>
<refpurpose>Return the target of a symbolic link</refpurpose>
<refpurpose>Returns the target of a symbolic link</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
@ -1995,7 +1992,7 @@ $fp = popen ("/bin/ls", "r");
<refentry id="function.rename">
<refnamediv>
<refname>rename</refname>
<refpurpose>Rename a file</refpurpose>
<refpurpose>Renames a file</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
@ -2046,7 +2043,7 @@ $fp = popen ("/bin/ls", "r");
<refentry id="function.rmdir">
<refnamediv>
<refname>rmdir</refname>
<refpurpose>Remove directory</refpurpose>
<refpurpose>Removes directory</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
@ -2073,7 +2070,7 @@ $fp = popen ("/bin/ls", "r");
<refentry id="function.stat">
<refnamediv>
<refname>stat</refname>
<refpurpose>Give information about a file</refpurpose>
<refpurpose>Gives information about a file</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
@ -2116,7 +2113,7 @@ $fp = popen ("/bin/ls", "r");
<refnamediv>
<refname>lstat</refname>
<refpurpose>
Give information about a file or symbolic link
Gives information about a file or symbolic link
</refpurpose>
</refnamediv>
<refsect1>
@ -2164,7 +2161,7 @@ $fp = popen ("/bin/ls", "r");
<refentry id="function.realpath">
<refnamediv>
<refname>realpath</refname>
<refpurpose>Return canonicalized absolute pathname</refpurpose>
<refpurpose>Returns canonicalized absolute pathname</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
@ -2181,12 +2178,11 @@ $fp = popen ("/bin/ls", "r");
absolute pathname. The resulting path will have no symbolic link,
'/./' or '/../' components.
</para>
<para>
<example>
<title><function>realpath</function> example</title>
<programlisting role="php">
$real_path = realpath("../../index.php");
$real_path = realpath ("../../index.php");
</programlisting>
</example>
</para>
@ -2196,7 +2192,7 @@ $real_path = realpath("../../index.php");
<refentry id="function.symlink">
<refnamediv>
<refname>symlink</refname>
<refpurpose>Create a symbolic link</refpurpose>
<refpurpose>Creates a symbolic link</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
@ -2219,7 +2215,7 @@ $real_path = realpath("../../index.php");
</para>
<note>
<simpara>
This function does not work on Windows systems
This function does not work on Windows systems.
</simpara>
</note>
</refsect1>
@ -2228,7 +2224,7 @@ $real_path = realpath("../../index.php");
<refentry id="function.tempnam">
<refnamediv>
<refname>tempnam</refname>
<refpurpose>create unique file name</refpurpose>
<refpurpose>Creates unique file name</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
@ -2269,7 +2265,7 @@ $tmpfname = tempnam ("/tmp", "FOO");
<refentry id="function.touch">
<refnamediv>
<refname>touch</refname>
<refpurpose>Set modification time of file</refpurpose>
<refpurpose>Sets modification time of file</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
@ -2295,12 +2291,13 @@ $tmpfname = tempnam ("/tmp", "FOO");
<para>
Returns true on success and false otherwise.
<example>
<title><function>touch</function> example</title>
<title><function>Touch</function> example</title>
<programlisting role="php">
if ( touch($FileName) ) {
print "$FileName modification time has been changed to todays date and time";
if (touch ($FileName)) {
print "$FileName modification time has been
changed to todays date and time";
} else {
print "Sorry Could Not change modification time of $FileName";
print "Sorry Could Not change modification time of $FileName";
}
</programlisting>
</example>
@ -2336,7 +2333,7 @@ if ( touch($FileName) ) {
<refentry id="function.unlink">
<refnamediv>
<refname>unlink</refname>
<refpurpose>Delete a file</refpurpose>
<refpurpose>Deletes a file</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
@ -2358,7 +2355,7 @@ if ( touch($FileName) ) {
</para>
<note>
<simpara>
This function may not work on Windows systems.
This function may not work on Windows systems.
</simpara>
</note>
</refsect1>