Hi there
I am trying to use filesize($variable) to get the size of a file passed into a function. I've checked that the filename is being passed into filesize() and even done filesize("abc.pdf" directly.
However I get the following response when this is executed by the browser:
Warning: stat failed for abc.pdf (errno=2 - No such file or directory) in C:\XITAMI\webpages\secc\bulletins.php on line 38
The pdf is accessible by the browser - the link to the file next to where I want the filesize to appear works fine.
Also, the pdf is held one directory below the script executing the filesize() function. As well as the above I've also tried: filesize("downloads/abc.pdf" but get the message:
Warning: stat failed for downloads/abc.pdf (errno=2 - No such file or directory) in C:\XITAMI\webpages\secc\bulletins.php on line 38
I've also tried both \\ and / to cope with Windows and Unix differences in directory locations.
Any thoughts on this would be appreciated!
Ta
-Colin
I am trying to use filesize($variable) to get the size of a file passed into a function. I've checked that the filename is being passed into filesize() and even done filesize("abc.pdf" directly.
However I get the following response when this is executed by the browser:
Warning: stat failed for abc.pdf (errno=2 - No such file or directory) in C:\XITAMI\webpages\secc\bulletins.php on line 38
The pdf is accessible by the browser - the link to the file next to where I want the filesize to appear works fine.
Also, the pdf is held one directory below the script executing the filesize() function. As well as the above I've also tried: filesize("downloads/abc.pdf" but get the message:
Warning: stat failed for downloads/abc.pdf (errno=2 - No such file or directory) in C:\XITAMI\webpages\secc\bulletins.php on line 38
I've also tried both \\ and / to cope with Windows and Unix differences in directory locations.
Any thoughts on this would be appreciated!
Ta
-Colin