Jump to content

filesize() issue


phporcaffeine

Recommended Posts


if I type literal text for filesize I can get the file's size. If I reference the filename by string then it returns 0


Example:

//DOES NOT WORK FOR ME

$path = "file.txt";

$size = filesize($path);

echo $size;


//THIS DOES WORK FOR ME

$size = filesize("file.txt");

echo $size;


Anyone have any ideas what I might be doing wrong?
Link to comment
https://forums.phpfreaks.com/topic/10003-filesize-issue/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.