|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2000-10-11 09:55 UTC] stas@php.net
[2000-10-28 23:54 UTC] sniper@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 19:00:01 2025 UTC |
I could be wrong, but it appears that fstat($fp) returns an array of nulls instead of an array of file stats. See the following code: $fp = fopen($filename, "r"); $fstats = fstat($fp); for($i=0; $i<14; $i++) { $len=strlen($fstats[i]); echo "fstats $i: $fstats[$i] / len=$len<br>\n"; } echo "fstat() with bogus pointer: ".fstat($bogusfp); ---------------- This is the output: fstats 0: / len=0 fstats 1: / len=0 fstats 2: / len=0 fstats 3: / len=0 fstats 4: / len=0 fstats 5: / len=0 fstats 6: / len=0 fstats 7: / len=0 fstats 8: / len=0 fstats 9: / len=0 fstats 10: / len=0 fstats 11: / len=0 fstats 12: / len=0 fstats 13: / len=0 Warning: Supplied argument is not a valid File-Handle resource in /home/mentat/public_html/dom-functions.php on line 23 fstat() with bogus pointer: