data can also be an array

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@171203 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Nuno Lopes 2004-10-24 17:22:50 +00:00
parent a9cb3f53ad
commit 5020ffe84d

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.3 $ -->
<!-- $Revision: 1.4 $ -->
<refentry id="function.file-put-contents">
<refnamediv>
<refname>file_put_contents</refname>
@ -10,7 +10,7 @@
<methodsynopsis>
<type>int</type><methodname>file_put_contents</methodname>
<methodparam><type>string</type><parameter>filename</parameter></methodparam>
<methodparam><type>string</type><parameter>data</parameter></methodparam>
<methodparam><type>mixed</type><parameter>data</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>flags</parameter></methodparam>
<methodparam choice="opt"><type>resource</type><parameter>context</parameter></methodparam>
</methodsynopsis>
@ -24,6 +24,11 @@
and/or <constant>FILE_APPEND</constant>, however the
<constant>FILE_USE_INCLUDE_PATH</constant> option should be used with caution.
</simpara>
<para>
You can also specify the <parameter>data</parameter> parameter as an array
(not multi-dimension arrays). This is equivalent to
<literal>file_put_contents($filename, join('', $array))</literal>.
</para>
&note.bin-safe;
&tip.fopen-wrapper;
<simpara>