PHPfile () function. The PHPfile () function previously used the file function to write a WEB anti-virus program. In fact, file directly reads a txt file and saves it to the array, so I think you know it's used as the PHP file () function. I used the file function to write a WEB anti-virus program, in fact, it is the file that directly reads a txt file and saves it to the array. then I think you also know what its function is, the first line in the txt file is put into the array.
PHP file () function previously I used the file function to write a WEB anti-virus program. In fact, file directly reads a txt file and saves it to the array, so I think you know what the function is. reading a file in a file is to put the first line in the txt file into an array.
Syntax:
Definition and usage
This file () reads a file to an array.
Each array element is contained from this file, and linefeeds are still valued.
Syntax
file(path,include_path,context)
Parameter |
Description |
| Path |
File path |
| Include_path |
Optional. Set this parameter to '1' if you want to search the include_path file (in php. ini) and |
| Context |
Optional. File processing within the specified range. The background is a set of options that can be modified. You can skip null. |
Tip and note: This function is a binary secure PHP 4.3. (It means the two binary data, such as and character data can be written into this function ). -------------------------------------------------- ------------------------------ Example
Print_r (file ("test.txt");?>
Output.
Array([0] => a
[1] => b.[2] => c,[3] => d?)
Http://www.bkjia.com/PHPjc/445504.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/445504.htmlTechArticlePHP file () function previously I used file function to write a WEB antivirus program Oh, in fact, is file to a txt file directly read and save to the array, so I think you know what it is...