PHP file () function previously I wrote a file function in the Web anti-virus program Oh, is actually file to read a TXT file directly and saved to the array, then I I think you also know what its role is it, file reading is the TXT file in the first line into the array inside
PHP file () function previously I wrote a file function in the Web anti-virus program Oh, is actually file to read a TXT file directly and saved to the array, then I I think you also know what its role is it, file reading is the TXT file in the first line into the array inside
Grammar:
Definition and usage
The file () reads a file into an array.
Each array element is contained from the file, and the line break is still attached.
Grammar
File (Path,include_path,context)
Parameter |
Description |
| Path |
File path |
| Include_path |
Optional Set this parameter to ' 1 ' If you want to search for files in include_path (in php.ini), and |
| Context |
Optional File processing within the specified range. The background is a set of options that can modify the behavior of the flow. You can skip using empty. |
Hints and Instructions tip: This feature becomes binary safe for php 4.3. (meaning that these two binary data, like and character data can be written to this function). --------------------------------------------------------------------------------For example
Print_r (File ("test.txt"));? >
Output.
Array ([0] = a
[1] = b.[2] = c,[3] = d?)
http://www.bkjia.com/PHPjc/445504.html www.bkjia.com true http://www.bkjia.com/PHPjc/445504.html techarticle PHP file () function I used the file function to write a in the Web antivirus program Oh, is actually file to read a TXT file directly and saved to the array, then I think you know it's done ...