mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
documentation of fflush
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@35016 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
7dfbb09618
commit
bb70145119
1 changed files with 61 additions and 34 deletions
|
@ -382,6 +382,33 @@ $df = diskfreespace("/"); // $df contains the number of bytes
|
|||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<refentry id="function.fflush">
|
||||
<refnamediv>
|
||||
<refname>fflush</refname>
|
||||
<refpurpose>Flushes the output to a file</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>int <function>fflush</function></funcdef>
|
||||
<paramdef>int <parameter>fp</parameter></paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
<para>
|
||||
This function forces a write of all buffered output to the
|
||||
to the resource pointed to by the file handle
|
||||
<parameter>fp</parameter>. Returns true if succesful, false
|
||||
otherwise.
|
||||
</para>
|
||||
<para>
|
||||
The file pointer must be valid, and must point to a file
|
||||
successfully opened by <function>fopen</function>,
|
||||
<function>popen</function>, or <function>fsockopen</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<refentry id="function.fgetc">
|
||||
<refnamediv>
|
||||
<refname>fgetc</refname>
|
||||
|
@ -959,30 +986,30 @@ $fcontents = join ('', file ('http://www.php.net'));
|
|||
<itemizedlist>
|
||||
<listitem>
|
||||
<simpara>
|
||||
To acquire a shared lock (reader), set
|
||||
<parameter>operation</parameter> to LOCK_SH (set to 1 prior to
|
||||
PHP 4.0.1).
|
||||
To acquire a shared lock (reader), set
|
||||
<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).
|
||||
To acquire an exclusive lock (writer), set
|
||||
<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).
|
||||
To release a lock (shared or exclusive), set
|
||||
<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>.
|
||||
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>.
|
||||
</simpara>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
|
@ -1068,42 +1095,42 @@ $fcontents = join ('', file ('http://www.php.net'));
|
|||
<itemizedlist>
|
||||
<listitem>
|
||||
<simpara>
|
||||
'r' - Open for reading only; place the file pointer at the
|
||||
beginning of the file.
|
||||
'r' - Open for reading only; place the file pointer at the
|
||||
beginning of the file.
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
'r+' - Open for reading and writing; place the file pointer at
|
||||
the beginning of the file.
|
||||
'r+' - Open for reading and writing; place the file pointer at
|
||||
the beginning of the file.
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
'w' - Open for writing only; place the file pointer at the
|
||||
beginning of the file and truncate the file to zero length.
|
||||
If the file does not exist, attempt to create it.
|
||||
'w' - Open for writing only; place the file pointer at the
|
||||
beginning of the file and truncate the file to zero length.
|
||||
If the file does not exist, attempt to create it.
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
'w+' - Open for reading and writing; place the file pointer at
|
||||
the beginning of the file and truncate the file to zero
|
||||
length. If the file does not exist, attempt to create it.
|
||||
'w+' - Open for reading and writing; place the file pointer at
|
||||
the beginning of the file and truncate the file to zero
|
||||
length. If the file does not exist, attempt to create it.
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
'a' - Open for writing only; place the file pointer at the end
|
||||
of the file. If the file does not exist, attempt to create
|
||||
it.
|
||||
'a' - Open for writing only; place the file pointer at the end
|
||||
of the file. If the file does not exist, attempt to create
|
||||
it.
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
'a+' - Open for reading and writing; place the file pointer at
|
||||
the end of the file. If the file does not exist, attempt to
|
||||
create it.
|
||||
'a+' - Open for reading and writing; place the file pointer at
|
||||
the end of the file. If the file does not exist, attempt to
|
||||
create it.
|
||||
</simpara>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
|
@ -2392,9 +2419,9 @@ $tmpfname = tempnam ("/tmp", "FOO");
|
|||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
<para>
|
||||
See also <function>tmpfile</function>.
|
||||
</para>
|
||||
<para>
|
||||
See also <function>tmpfile</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
|
@ -2442,9 +2469,9 @@ $tmpfname = tempnam ("/tmp", "FOO");
|
|||
<funcdef>int <function>touch</function></funcdef>
|
||||
<paramdef>string <parameter>filename</parameter></paramdef>
|
||||
<paramdef>int
|
||||
<parameter>
|
||||
<optional>time</optional>
|
||||
</parameter>
|
||||
<parameter>
|
||||
<optional>time</optional>
|
||||
</parameter>
|
||||
</paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
|
|
Loading…
Reference in a new issue