Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.