mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
Fixes #43727
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@257786 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
6448a1e599
commit
edf90ac05e
1 changed files with 21 additions and 1 deletions
|
@ -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">
|
||||
|
|
Loading…
Reference in a new issue