More docs for streams related changes.

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@73614 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Wez Furlong 2002-03-16 17:02:35 +00:00
parent 01d277e32f
commit 1afdc77d29

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.129 $ -->
<!-- $Revision: 1.130 $ -->
<reference id="ref.filesystem">
<title>Filesystem functions</title>
<titleabbrev>Filesystem</titleabbrev>
@ -233,6 +233,13 @@ if (!copy($file, $file.'.bak')) {
</programlisting>
</example>
</para>
<note>
<para>
As of PHP 4.3.0, both <parameter>source</parameter> and
<parameter>dest</parameter> may be URLs if the "fopen wrappers"
have been enable. See <function>fopen</function> for more details.
</para>
</note>
<warning>
<para>
If the destination file already exists, it will be overwritten.
@ -672,6 +679,27 @@ fclose ($fd);
</refsect1>
</refentry>
<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>
<methodsynopsis>
<type>string</type><methodname>file_get_contents</methodname>
<methodparam><type>string</type><parameter>filename</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>use_include_path</parameter></methodparam>
</methodsynopsis>
<para>
Identical to <function>readfile</function>, except that
<function>file_get_contents</function> returns the file in a string.
</para>
&note.bin-safe;
&tip.fopen-wrapper;
</refsect1>
</refentry>
<refentry id="function.file">
<refnamediv>
<refname>file</refname>
@ -720,6 +748,12 @@ $fcontents = implode ('', file ('http://www.php.net/'));
</programlisting>
</informalexample>
</para>
<note>
<para>
As of PHP 4.3.0 you can use <function>file_get_contents</function> to
return the contents of a file as a string in a binary safe manner.
</para>
</note>
&note.not-bin-safe;
&tip.fopen-wrapper;
<para>
@ -1184,6 +1218,7 @@ $fcontents = implode ('', file ('http://www.php.net/'));
As of PHP 4.3.0 (not yet released), if you have compiled in
support for OpenSSL, you may use "https://" to open an HTTP
connection over SSL.
</simpara>
<simpara>
Note that the file pointer allows you to retrieve only the
<emphasis>body</emphasis> of the response; to retrieve the HTTP