sean            Fri Oct 22 23:33:15 2004 EDT

  Modified files:              
    /phpdoc/en/reference/filesystem/functions   tmpfile.xml 
  Log:
  cleared up confusion about mode
  
http://cvs.php.net/diff.php/phpdoc/en/reference/filesystem/functions/tmpfile.xml?r1=1.4&r2=1.5&ty=u
Index: phpdoc/en/reference/filesystem/functions/tmpfile.xml
diff -u phpdoc/en/reference/filesystem/functions/tmpfile.xml:1.4 
phpdoc/en/reference/filesystem/functions/tmpfile.xml:1.5
--- phpdoc/en/reference/filesystem/functions/tmpfile.xml:1.4    Fri May 30 16:43:26 
2003
+++ phpdoc/en/reference/filesystem/functions/tmpfile.xml        Fri Oct 22 23:33:14 
2004
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.4 $ -->
+<!-- $Revision: 1.5 $ -->
 <!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.32 -->
   <refentry id="function.tmpfile">
    <refnamediv>
@@ -13,7 +13,7 @@
       <void/>
      </methodsynopsis>
     <para>
-     Creates a temporary file with an unique name in write mode,
+     Creates a temporary file with an unique name in read-write (w+) mode,
      returning a file handle similar to the one returned by
      <function>fopen</function>.
      The file is automatically removed when closed (using
@@ -32,10 +32,18 @@
 <?php
 $temp = tmpfile();
 fwrite($temp, "writing to tempfile");
+fseek($temp, 0);
+echo fread($temp, 1024);
 fclose($temp); // this removes the file
 ?>
 ]]>
       </programlisting>
+      &example.outputs;
+      <screen>
+<![CDATA[
+writing to tempfile
+]]>
+      </screen>
      </example>
     </para>
     <para>

Reply via email to