cvs: phpdoc /en/reference/filesystem/functions fwrite.xml
| From: | Kalle Sommer Nielsen | Date: | Fri, 18 Apr 2008 06:29:10 +0000 |
| Subject: | cvs: phpdoc /en/reference/filesystem/functions fwrite.xml | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-1520@lists.php.net to get a copy of this message | ||
kalle Fri Apr 18 06:29:10 2008 UTC
Modified files:
/phpdoc/en/reference/filesystem/functions fwrite.xml
Log:
Fixes #43727
http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/filesystem/functions/fwrite.xml?r1=1.17&r2=1.18&diff_format=u
Index: phpdoc/en/reference/filesystem/functions/fwrite.xml
diff -u phpdoc/en/reference/filesystem/functions/fwrite.xml:1.17
phpdoc/en/reference/filesystem/functions/fwrite.xml:1.18
--- phpdoc/en/reference/filesystem/functions/fwrite.xml:1.17 Sat Sep 15 02:44:00 2007
+++ phpdoc/en/reference/filesystem/functions/fwrite.xml Fri Apr 18 06:29:10 2008
@@ -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">