note 9476 deleted from function.filesize by jimw

From: Date: Fri, 14 Dec 2001 20:16:00 +0000
Subject: note 9476 deleted from function.filesize by jimw
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-22715@lists.php.net to get a copy of this message
[Editor's note: Reading a directory does not automagically makes all the other filesystem functions *know* what dir has been read. This is problem in your coding logic, not a shortcoming of the filesize() function, which would work correctly if you pass the full path to the file.] When executing a "readdir" command, filesize doesn't seem able to get the size of some files if they aren't in the same directory as the script. The workaround to this is changing the working directory with "chdir" in addition to "readdir".

« previous php.notes (#22715) next »