Jump to content

[SOLVED] file size


cavendano

Recommended Posts

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

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

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.