Forum Moderators: coopster

Message Too Old, No Replies

filesize()

         

Hobgoblin

12:57 am on Nov 8, 2003 (gmt 0)

10+ Year Member



Hi

I'm having a problem with the filesize() function while running a script in a directory above where the files being read are.

The script is located in /members/download.php.

I have a query string at the end that retreives the directory from the database, and tells the script where to locate the files.

It prints out the filenames perfectly, but all the filesizes come out as 0.

Any ideas on the remedy?

lorax

4:46 am on Nov 8, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Are you using the server's (not the URL) file/dir structure and absolute paths?

hakre

7:57 am on Nov 8, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



set all error and warnings on, and you know what's going wrong immediatly (my favorite tip for debugging here):
error_reporting (E_ALL);

add it to the top of your code and php will even display warnings, such as files do not exist on which you try to get the filesize. more info can be obtained about error reporting here [de3.php.net].

lorax

2:00 pm on Nov 8, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



That's a good tip hakre!