cvs: phpdoc /en/functions filesystem.xml

From: Date: Sat, 08 Dec 2001 22:14:24 +0000
Subject: cvs: phpdoc /en/functions filesystem.xml
Groups: php.doc 
Request: Send a blank email to phpdoc+get-969339573@lists.php.net to get a copy of this message
jimw Sat Dec 8 17:14:24 2001 EDT Modified files: /phpdoc/en/functions filesystem.xml Log: file: incorporate user notes Index: phpdoc/en/functions/filesystem.xml diff -u phpdoc/en/functions/filesystem.xml:1.96 phpdoc/en/functions/filesystem.xml:1.97 --- phpdoc/en/functions/filesystem.xml:1.96 Sat Dec 8 14:22:07 2001 +++ phpdoc/en/functions/filesystem.xml Sat Dec 8 17:14:24 2001 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.96 $ --> +<!-- $Revision: 1.97 $ --> <reference id="ref.filesystem"> <title>Filesystem functions</title> <titleabbrev>Filesystem</titleabbrev> @@ -720,6 +720,13 @@ element of the array corresponds to a line in the file, with the newline still attached. </para> + <note> + <para> + Each line in the resulting array will include the line ending, so you + still need to use <function>trim</function> if you do not want the line + ending present. + </para> + </note> <para> You can use the optional second parameter and set it to "1", if you want to search for the file in the <link @@ -731,18 +738,20 @@ <![CDATA[ <?php // get a web page into an array and print it out -$fcontents = file ('http://www.php.net'); +$fcontents = file ('http://www.php.net/'); while (list ($line_num, $line) = each ($fcontents)) { - echo "<b>Line $line_num:</b>; " . htmlspecialchars ($line) . "<br>\n"; + echo "<b>Line $line_num:</b>; ", htmlspecialchars ($line), "<br>\n"; } // get a web page into a string -$fcontents = join ('', file ('http://www.php.net')); +$fcontents = join ('', file ('http://www.php.net/')); ?> ]]> </programlisting> </informalexample> </para> + &note.not-bin-safe; + &tip.fopen-wrapper; <para> See also <function>readfile</function>, <function>fopen</function>, <function>fsockopen</function>, and

« previous php.doc (#969339573) next »