cavendano Posted October 12, 2007 Share Posted October 12, 2007 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; 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... Link to comment https://forums.phpfreaks.com/topic/72940-solved-file-size/ Share on other sites More sharing options...
kenrbnsn Posted October 12, 2007 Share Posted October 12, 2007 It would be helpful if you switch the order of the statements, since you're using variables before they are set: <?php $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); ?> Ken Link to comment https://forums.phpfreaks.com/topic/72940-solved-file-size/#findComment-367867 Share on other sites More sharing options...
cavendano Posted October 12, 2007 Author Share Posted October 12, 2007 that worked thanks! Link to comment https://forums.phpfreaks.com/topic/72940-solved-file-size/#findComment-367983 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.