mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
WS, prepare for new doc style
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@237787 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
e78f5f335a
commit
891ea0a06e
9 changed files with 151 additions and 149 deletions
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.13 $ -->
|
||||
<!-- $Revision: 1.14 $ -->
|
||||
<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 -->
|
||||
<refentry id="function.feof">
|
||||
<refnamediv>
|
||||
|
@ -16,23 +16,23 @@
|
|||
Returns &true; if the file pointer is at EOF or an error occurs
|
||||
(including socket timeout); otherwise returns &false;.
|
||||
</para>
|
||||
<warning>
|
||||
<simpara>
|
||||
If a connection opened by <function>fsockopen</function> wasn't closed
|
||||
by the server, <function>feof</function> will wait until a timeout has
|
||||
been reached to return &true;. The default timeout value is 60 seconds.
|
||||
You may use <function>stream_set_timeout</function> to change this
|
||||
value.
|
||||
</simpara>
|
||||
</warning>
|
||||
&fs.validfp.all;
|
||||
<warning>
|
||||
<para>
|
||||
If passed file pointer is not valid you may get an infinite loop, because
|
||||
EOF fails to return TRUE.
|
||||
<example>
|
||||
<title><function>feof</function> example with an invalid file pointer</title>
|
||||
<programlisting role="php">
|
||||
<warning>
|
||||
<simpara>
|
||||
If a connection opened by <function>fsockopen</function> wasn't closed
|
||||
by the server, <function>feof</function> will wait until a timeout has
|
||||
been reached to return &true;. The default timeout value is 60 seconds.
|
||||
You may use <function>stream_set_timeout</function> to change this
|
||||
value.
|
||||
</simpara>
|
||||
</warning>
|
||||
&fs.validfp.all;
|
||||
<warning>
|
||||
<para>
|
||||
If passed file pointer is not valid you may get an infinite loop, because
|
||||
EOF fails to return TRUE.
|
||||
<example>
|
||||
<title><function>feof</function> example with an invalid file pointer</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
// if file can not be read or doesn't exist fopen function returns FALSE
|
||||
|
@ -45,10 +45,10 @@ while (!feof($file)) {
|
|||
fclose($file);
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</warning>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</warning>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.16 $ -->
|
||||
<!-- $Revision: 1.17 $ -->
|
||||
<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 -->
|
||||
<refentry id="function.file-exists">
|
||||
<refnamediv>
|
||||
|
@ -53,7 +53,7 @@ if (file_exists($filename)) {
|
|||
linkend="ini.safe-mode-include-dir">safe_mode_include_dir</link>.
|
||||
</para>
|
||||
</warning>
|
||||
|
||||
|
||||
<note>
|
||||
<para>
|
||||
The check is done using the real UID/GID instead of the effective one.
|
||||
|
|
|
@ -1,100 +1,101 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.25 $ -->
|
||||
<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.130 -->
|
||||
<refentry id="function.file-get-contents">
|
||||
<refnamediv>
|
||||
<refname>file_get_contents</refname>
|
||||
<refpurpose>Reads entire file into a string</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>string</type><methodname>file_get_contents</methodname>
|
||||
<methodparam><type>string</type><parameter>filename</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>bool</type><parameter>use_include_path</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>resource</type><parameter>context</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>offset</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>maxlen</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Identical to <function>file</function>, except that
|
||||
<function>file_get_contents</function> returns the file in a string,
|
||||
starting at the specified <parameter>offset</parameter> up to
|
||||
<parameter>maxlen</parameter> bytes.
|
||||
On failure, <function>file_get_contents</function> will return &false;.
|
||||
</para>
|
||||
<para>
|
||||
<function>file_get_contents</function> is the preferred way to read the
|
||||
contents of a file into a string. It will use memory mapping techniques if
|
||||
supported by your OS to enhance performance.
|
||||
</para>
|
||||
<note>
|
||||
<para>
|
||||
If you're opening a URI with special characters, such as spaces, you
|
||||
need to encode the URI with <function>urlencode</function>.
|
||||
</para>
|
||||
</note>
|
||||
<note>
|
||||
<para>
|
||||
<parameter>context</parameter> parameter can be skipped by &null;.
|
||||
</para>
|
||||
</note>
|
||||
</refsect1>
|
||||
<!-- $Revision: 1.26 $ -->
|
||||
<refentry id="function.file-get-contents">
|
||||
<refnamediv>
|
||||
<refname>file_get_contents</refname>
|
||||
<refpurpose>Reads entire file into a string</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="changelog">
|
||||
&reftitle.changelog;
|
||||
<para>
|
||||
<informaltable>
|
||||
<tgroup cols="2">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>&Version;</entry>
|
||||
<entry>&Description;</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>5.0.0</entry>
|
||||
<entry>
|
||||
Added the context support.
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>5.1.0</entry>
|
||||
<entry>
|
||||
Added the <parameter>offset</parameter> and
|
||||
<parameter>maxlen</parameter> parameters.
|
||||
</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>string</type><methodname>file_get_contents</methodname>
|
||||
<methodparam><type>string</type><parameter>filename</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>bool</type><parameter>use_include_path</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>resource</type><parameter>context</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>offset</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>maxlen</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Identical to <function>file</function>, except that
|
||||
<function>file_get_contents</function> returns the file in a string,
|
||||
starting at the specified <parameter>offset</parameter> up to
|
||||
<parameter>maxlen</parameter> bytes.
|
||||
On failure, <function>file_get_contents</function> will return &false;.
|
||||
</para>
|
||||
<para>
|
||||
<function>file_get_contents</function> is the preferred way to read the
|
||||
contents of a file into a string. It will use memory mapping techniques if
|
||||
supported by your OS to enhance performance.
|
||||
</para>
|
||||
<note>
|
||||
<para>
|
||||
If you're opening a URI with special characters, such as spaces, you
|
||||
need to encode the URI with <function>urlencode</function>.
|
||||
</para>
|
||||
</note>
|
||||
<note>
|
||||
<para>
|
||||
<parameter>context</parameter> parameter can be skipped by &null;.
|
||||
</para>
|
||||
</note>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="notes">
|
||||
&reftitle.notes;
|
||||
¬e.bin-safe;
|
||||
&tip.fopen-wrapper;
|
||||
¬e.context-support;
|
||||
&warn.ssl-non-standard;
|
||||
</refsect1>
|
||||
<refsect1 role="changelog">
|
||||
&reftitle.changelog;
|
||||
<para>
|
||||
<informaltable>
|
||||
<tgroup cols="2">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>&Version;</entry>
|
||||
<entry>&Description;</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>5.0.0</entry>
|
||||
<entry>
|
||||
Added the context support.
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>5.1.0</entry>
|
||||
<entry>
|
||||
Added the <parameter>offset</parameter> and
|
||||
<parameter>maxlen</parameter> parameters.
|
||||
</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>file</function></member>
|
||||
<member><function>fgets</function></member>
|
||||
<member><function>fread</function></member>
|
||||
<member><function>readfile</function></member>
|
||||
<member><function>file_put_contents</function></member>
|
||||
<member><function>stream_get_contents</function></member>
|
||||
<member><function>stream_context_create</function></member>
|
||||
</simplelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
<refsect1 role="notes">
|
||||
&reftitle.notes;
|
||||
¬e.bin-safe;
|
||||
&tip.fopen-wrapper;
|
||||
¬e.context-support;
|
||||
&warn.ssl-non-standard;
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>file</function></member>
|
||||
<member><function>fgets</function></member>
|
||||
<member><function>fread</function></member>
|
||||
<member><function>readfile</function></member>
|
||||
<member><function>file_put_contents</function></member>
|
||||
<member><function>stream_get_contents</function></member>
|
||||
<member><function>stream_context_create</function></member>
|
||||
</simplelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.12 $ -->
|
||||
<!-- $Revision: 1.13 $ -->
|
||||
<refentry id="function.file-put-contents">
|
||||
<refnamediv>
|
||||
<refname>file_put_contents</refname>
|
||||
<refpurpose>Write a string to a file</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
|
@ -127,7 +128,6 @@
|
|||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
||||
<refsect1 role="notes">
|
||||
&reftitle.notes;
|
||||
¬e.bin-safe;
|
||||
|
@ -135,7 +135,6 @@
|
|||
&tip.fopen-wrapper;
|
||||
</refsect1>
|
||||
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
|
@ -147,6 +146,7 @@
|
|||
</simplelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.8 $ -->
|
||||
<!-- $Revision: 1.9 $ -->
|
||||
<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 -->
|
||||
<refentry id="function.filectime">
|
||||
<refnamediv>
|
||||
|
@ -25,7 +25,8 @@
|
|||
when you want to create "Last Modified" footers on web pages) and
|
||||
<function>fileatime</function>.
|
||||
</para>
|
||||
<para>Note also that in some Unix texts the ctime of a file is
|
||||
<para>
|
||||
Note also that in some Unix texts the ctime of a file is
|
||||
referred to as being the creation time of the file. This is wrong.
|
||||
There is no creation time for Unix files in most Unix filesystems.
|
||||
</para>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.12 $ -->
|
||||
<!-- $Revision: 1.13 $ -->
|
||||
<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 -->
|
||||
<refentry id="function.flock">
|
||||
<refnamediv>
|
||||
|
@ -34,30 +34,30 @@
|
|||
<itemizedlist>
|
||||
<listitem>
|
||||
<simpara>
|
||||
To acquire a shared lock (reader), set
|
||||
<parameter>operation</parameter> to <constant>LOCK_SH</constant> (set to 1 prior to
|
||||
PHP 4.0.1).
|
||||
To acquire a shared lock (reader), set
|
||||
<parameter>operation</parameter> to <constant>LOCK_SH</constant> (set to 1 prior to
|
||||
PHP 4.0.1).
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
To acquire an exclusive lock (writer), set
|
||||
<parameter>operation</parameter> to <constant>LOCK_EX</constant> (set to 2 prior to
|
||||
PHP 4.0.1).
|
||||
To acquire an exclusive lock (writer), set
|
||||
<parameter>operation</parameter> to <constant>LOCK_EX</constant> (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 <constant>LOCK_UN</constant> (set to 3 prior to
|
||||
PHP 4.0.1).
|
||||
To release a lock (shared or exclusive), set
|
||||
<parameter>operation</parameter> to <constant>LOCK_UN</constant> (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 <constant>LOCK_NB</constant> (4 prior to PHP 4.0.1) to
|
||||
<parameter>operation</parameter>.
|
||||
If you don't want <function>flock</function> to block while
|
||||
locking, add <constant>LOCK_NB</constant> (4 prior to PHP 4.0.1) to
|
||||
<parameter>operation</parameter>.
|
||||
</simpara>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
|
@ -71,7 +71,7 @@
|
|||
(which is also called automatically when script finished).
|
||||
</simpara>
|
||||
<simpara>
|
||||
&return.success;
|
||||
&return.success;
|
||||
</simpara>
|
||||
<para>
|
||||
<example>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.11 $ -->
|
||||
<!-- $Revision: 1.12 $ -->
|
||||
<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 -->
|
||||
<refentry id="function.is-readable">
|
||||
<refnamediv>
|
||||
|
@ -48,7 +48,7 @@ if (is_readable($filename)) {
|
|||
The check is done using the real UID/GID instead of the effective one.
|
||||
</para>
|
||||
</note>
|
||||
|
||||
|
||||
<para>
|
||||
See also <function>is_writable</function>,
|
||||
<function>file_exists</function>, and
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.8 $ -->
|
||||
<!-- $Revision: 1.9 $ -->
|
||||
<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.39 -->
|
||||
<refentry id="function.is-uploaded-file">
|
||||
<refnamediv>
|
||||
|
@ -61,8 +61,8 @@ if (is_uploaded_file($_FILES['userfile']['tmp_name'])) {
|
|||
</para>
|
||||
</note>
|
||||
</para>
|
||||
<example>
|
||||
<title><function>is_uploaded_file</function> example for PHP 4 < 4.0.3</title>
|
||||
<example>
|
||||
<title><function>is_uploaded_file</function> example for PHP 4 < 4.0.3</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.7 $ -->
|
||||
<!-- $Revision: 1.8 $ -->
|
||||
<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 -->
|
||||
<refentry id="function.readlink">
|
||||
<refnamediv>
|
||||
|
@ -13,14 +13,14 @@
|
|||
<methodparam><type>string</type><parameter>path</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
<function>readlink</function> does the same as the readlink C
|
||||
function and returns the contents of the symbolic link path or &false;
|
||||
in case of error.
|
||||
<function>readlink</function> does the same as the readlink C
|
||||
function and returns the contents of the symbolic link path or &false;
|
||||
in case of error.
|
||||
</para>
|
||||
<para>
|
||||
<example>
|
||||
<title><function>readlink</function> example</title>
|
||||
<programlisting role="php">
|
||||
<para>
|
||||
<example>
|
||||
<title><function>readlink</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
|
|
Loading…
Reference in a new issue