git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@257786 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Kalle Sommer Nielsen 2008-04-18 06:29:10 +00:00
parent 6448a1e599
commit edf90ac05e

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.17 $ -->
<!-- $Revision: 1.18 $ -->
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.fwrite">
<refnamediv>
<refname>fwrite</refname>
@ -89,6 +89,26 @@
interruption.
</para>
</note>
<note>
<para>
If writing twice to the file pointer, then the data will be appended to
the end of the file content, meaning that the example below wouldn't work
as expected:
<programlisting role="php">
<![CDATA[
<?php
$fp = fopen('data.txt', 'w');
fwrite($fp, '1');
fwrite($fp, '23');
fclose($fp);
// the content of 'data.txt' is now 123 and not 23!
?>
]]>
</programlisting>
</para>
</note>
</refsect1>
<refsect1 role="examples">