I have a script that requires the posting of file size it is odd but mp3 wont read the file size. It is odd but the filesize for mp3 doesnt work but m4a does...any ideas? $get_size_mp3 = filesize("$dir_test_mp3"); $get_size_mp4 = filesize("$dir_test_mp4"); $dir_test_mp4 = temp/$sname.m4a; $dir_test_mp3 = temp/$sname.mp3; PHP: so if i type echo $get_size_mp4 I get a value such as 1222 but if i type echo $get_size_mp3 I get a blank value any ideas would be great...
Please post the code you're actually using and don't retype it here. filesize() has no reason to not work unless it can't open the file or the file name is given incorrectly.
Erm, shouldn't you define the variables before trying to get their file size? $dir_test_mp4 = temp/$sname.m4a; $dir_test_mp3 = temp/$sname.mp3; $get_size_mp3 = filesize("$dir_test_mp3"); $get_size_mp4 = filesize("$dir_test_mp4"); PHP:
And use quotes... that's why I told him to show us his real code cause the one he posted wouldn't work at ALL.
PMed him how to get it to work. after i saw all the script he had two variables defined for the same thing. one good one bad.