Drop broken example

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@277665 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Johannes Schlüter 2009-03-23 23:13:45 +00:00
parent 731951da6c
commit 36e395fbb5

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.25 $ -->
<!-- $Revision: 1.26 $ -->
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.file-put-contents">
<refnamediv>
<refname>file_put_contents</refname>
@ -189,30 +189,6 @@ $person = "John Smith\n";
// and the LOCK_EX flag to prevent anyone else writing to the file at the same time
file_put_contents($file, $person, FILE_APPEND | LOCK_EX);
?>
]]>
</programlisting>
</example>
<example>
<title>Using stream contexts</title>
<programlisting role="php">
<![CDATA[
<?php
// Create a stream
$opts = array(
'http'=>array(
'method'=>"GET",
'header'=>"Accept-language: en\r\n" .
"Cookie: foo=bar\r\n"
)
);
$context = stream_context_create($opts);
$person = "John Smith\n";
// Add content to the file using the HTTP headers set above
file_put_contents('people.txt', $person, NULL, $context);
?>
]]>
</programlisting>
</example>