File
(PHP 3, PHP 4 >= 4.0.0) file--read the entire file to an array description
Array file (string filename [, int use_include_path])
In addition to the file () returns an array, the other is the same as the Web site building Server scripting Class \phpphp user manual Fancyfunction.readfile.html>readfile (). Each element of the array corresponds to each line of the file, with a newline character.
Note: In the result array, each line is wrapped with the end of the line, and you can use the trim () function to remove it if you don't want the end of the line.
If you want to search for a file in the include path, you can use the optional second parameter and set it to "1".
Line $line _num:; ", Htmlspecialchars ($line),"
";} Get a webpage into the string $fcontents = Join (, file (http://www.php.net/));? >
Warning
This function cannot be used in binary!
Tip: If the "fopen wrappers" configuration is already open, you can use the URL as the file name in this function.
See ReadFile (), fopen (), Fsockopen (), and Popen ().
http://www.bkjia.com/PHPjc/532348.html www.bkjia.com true http://www.bkjia.com/PHPjc/532348.html techarticle File (PHP 3, PHP 4 >= 4.0.0) file--reads the entire file into the array description array file (string filename [, int use_include_path]) except that file () returns the number Groups, and other web-building services ...