Added a flags parameter example

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@253976 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Philip Olson 2008-02-29 17:47:09 +00:00
parent 21e7c313a9
commit f7cb72e070

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">
<refnamediv>
<refname>file</refname>
@ -203,6 +203,9 @@ foreach ($lines as $line_num => $line) {
// Another example, let's get a web page into a string. See also file_get_contents().
$html = implode('', file('http://www.example.com/'));
// Using the optional flags parameter since PHP 5
$trimmed = file('somefile.txt', FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES)
?>
]]>
</programlisting>