cvs: phpdoc /en/reference/filesystem/functions file-get-contents.xml file-put-contents.xml

From: Date: Wed, 09 Feb 2005 17:06:38 +0000
Subject: cvs: phpdoc /en/reference/filesystem/functions file-get-contents.xml file-put-contents.xml
Groups: php.doc 
Request: Send a blank email to phpdoc+get-969366446@lists.php.net to get a copy of this message
nlopess Wed Feb 9 12:06:38 2005 EDT Modified files: /phpdoc/en/reference/filesystem/functions file-get-contents.xml file-put-contents.xml Log: document more PHP 5.1 changes http://cvs.php.net/diff.php/phpdoc/en/reference/filesystem/functions/file-get-contents.xml?r1=1.21&r2=1.22&ty=u Index: phpdoc/en/reference/filesystem/functions/file-get-contents.xml diff -u phpdoc/en/reference/filesystem/functions/file-get-contents.xml:1.21 phpdoc/en/reference/filesystem/functions/file-get-contents.xml:1.22 --- phpdoc/en/reference/filesystem/functions/file-get-contents.xml:1.21 Tue Nov 23 14:43:51 2004 +++ phpdoc/en/reference/filesystem/functions/file-get-contents.xml Wed Feb 9 12:06:36 2005 @@ -1,24 +1,26 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.21 $ --> +<!-- $Revision: 1.22 $ --> <!-- 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> - <title>Description</title> + <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>. + 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> @@ -27,26 +29,62 @@ supported by your OS to enhance performance. </para> <note> - <simpara> - The <parameter>offset</parameter> parameter was added in PHP 5.1.0. - </simpara> - </note> - <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> + </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="notes"> + &reftitle.notes; &note.bin-safe; &tip.fopen-wrapper; - &note.context-support; &warn.ssl-non-standard; - <simpara> - See also <function>fgets</function>, <function>file</function>, - <function>fread</function>, <function>include</function>, - <function>readfile</function> &listendand; - <function>file_put_contents</function> - </simpara> + </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> + </simplelist> + </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc/en/reference/filesystem/functions/file-put-contents.xml?r1=1.4&r2=1.5&ty=u Index: phpdoc/en/reference/filesystem/functions/file-put-contents.xml diff -u phpdoc/en/reference/filesystem/functions/file-put-contents.xml:1.4 phpdoc/en/reference/filesystem/functions/file-put-contents.xml:1.5 --- phpdoc/en/reference/filesystem/functions/file-put-contents.xml:1.4 Sun Oct 24 13:22:50 2004 +++ phpdoc/en/reference/filesystem/functions/file-put-contents.xml Wed Feb 9 12:06:38 2005 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.4 $ --> +<!-- $Revision: 1.5 $ --> <refentry id="function.file-put-contents"> <refnamediv> <refname>file_put_contents</refname> @@ -29,6 +29,12 @@ (not multi-dimension arrays). This is equivalent to <literal>file_put_contents($filename, join('', $array))</literal>. </para> + <para> + As of PHP 5.1.0, you may also pass a stream resource to the + <parameter>data</parameter> parameter. In result, the remaining buffer of + that stream will be copied to the specified file. This is similar with + using <function>stream_copy_to_stream</function>. + </para> &note.bin-safe; &tip.fopen-wrapper; <simpara>

« previous php.doc (#969366446) next »