View Full Version : Getting File Size

08-10-2002, 04:52 PM
I am attempting to use the filesize() function, to determine the file size of certain videos. BUT, unfortunately, it's not working for some reason. Should I be using the full path when trying to get the file size? (i.e. www.abc.com/media/video/filename.wmv) Or should I be using something else?

See below for the code:

// I've checked the path to the videos, and these work
$thevideofilehi = $baseurl."media/video/".$videos["videofile"]."_high.".$videos["videofiletype"];
$thevideofilelo = $baseurl."media/video/".$videos["videofile"]."_low.".$videos["videofiletype"];

$thevideosizehi = filesize($thevideofilehi);
$thevideosizelo = filesize($thevideofilelo);

echo "hi ".$thevideosizehi."<br>";
echo "hi ".$thevideosizelo."<br>";

Any ideas?


08-18-2002, 10:45 PM
You may have to use a path - but I'm not one to say! :D

ie. /home/me/media/etc.

08-18-2002, 11:17 PM
That's what the $baseurl variable was for.