note 16186 added to function.file
| From: | bear at datasys dot org | Date: | Fri, 19 Oct 2001 07:34:13 +0000 |
| Subject: | note 16186 added to function.file | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-19150@lists.php.net to get a copy of this message | ||
The file functions does not seem to handle ascii value 0 in a file... (probably because the c-code
that reads in the file interprets it as a null terminated string). Anyways if a file contains a
ascii value 0, the content read in will end at the first ascii 0. So to successfully read in files
like /proc/pid/cmdline, or /proc/pid/environ which both use ascii 0 as a field separator for
it's content you have to use fread, fgets or similar.
--
http://www.php.net/manual/en/function.file.php
http://master.php.net/manage/user-notes.php?action=edit+16186
http://master.php.net/manage/user-notes.php?action=delete+16186
http://master.php.net/manage/user-notes.php?action=reject+16186