PHP File: 3 Way of Reading FileTag: file, read file Category: PHP Basicpost: 13 Apr 2008 read: 1,207 PHP File Tips - Part 1: There are 3 way to read file. You can use file(), file_get_contents(), or fread(). What the different? Ok, create a file named "test.txt" for testing. I enter following text in this file:
First, we try to use file(). It will generate array.
Second, you can use file_get_contents(). It generate string:
Last, for PHP 4. You can use like this:
|
| | Give Your Opinion | Recommend |
|


