cvs: phpdoc /en/functions filesystem.xml

From: Date: Fri, 14 Dec 2001 19:38:23 +0000
Subject: cvs: phpdoc /en/functions filesystem.xml
Groups: php.doc 
Request: Send a blank email to phpdoc+get-969339744@lists.php.net to get a copy of this message
jimw Fri Dec 14 14:38:23 2001 EDT Modified files: /phpdoc/en/functions filesystem.xml Log: fpassthru: incorporate notes Index: phpdoc/en/functions/filesystem.xml diff -u phpdoc/en/functions/filesystem.xml:1.98 phpdoc/en/functions/filesystem.xml:1.99 --- phpdoc/en/functions/filesystem.xml:1.98 Wed Dec 12 15:46:47 2001 +++ phpdoc/en/functions/filesystem.xml Fri Dec 14 14:38:23 2001 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.98 $ --> +<!-- $Revision: 1.99 $ --> <reference id="ref.filesystem"> <title>Filesystem functions</title> <titleabbrev>Filesystem</titleabbrev> @@ -1366,25 +1366,35 @@ </funcprototype> </funcsynopsis> <simpara> - Reads to EOF on the given file pointer and writes the results to - standard output. + Reads to EOF on the given file pointer from the current position and + writes the results to standard output. </simpara> <simpara> If an error occurs, <function>fpassthru</function> returns &false;. </simpara> <simpara> - The file pointer must be valid, and must point to a file - successfully opened by <function>fopen</function>, - <function>popen</function>, or <function>fsockopen</function>. - The file is closed when <function>fpassthru</function> is done - reading it (leaving <parameter>fp</parameter> useless). + The file pointer must be valid, and must point to a file successfully + opened by <function>fopen</function>, <function>popen</function>, or + <function>fsockopen</function>. You may need to call + <function>rewind</function> to reset the file pointer to the beginning of + the file if you have already written data to the file. The file is + closed when <function>fpassthru</function> is done reading it (leaving + <parameter>fp</parameter> useless). </simpara> <simpara> If you just want to dump the contents of a file to stdout you may want to use the <function>readfile</function>, which saves you the <function>fopen</function> call. </simpara> + <note> + <para> + When using <function>fpassthru</function> on a binary file on Windows + systems, you should make sure to open the file in binary mode by + appending a <literal>b</literal> to the mode used in the call to + <function>fopen</function>. + </para> + </note> <simpara> See also <function>readfile</function>, <function>fopen</function>, <function>popen</function>, and

« previous php.doc (#969339744) next »