Forums

Display file size (2 posts)

  1. jshindler
    Member
    Posted 1 year ago #

    I'm trying to get back the size of an mp3 using the following code

    <?php $values = get_post_custom_values("audioFile"); if($values[0] == "") { echo "Not available"; } else { echo filesize ($values[0]); }
    ?>

    When I want to bring back the file path it is fine. When I try adding the echo filesize to the end of the else statement I get the following error:

    Warning: filesize(): stat failed for

  2. Reuben Gunday
    Member
    Posted 1 year ago #

    Maybe you are using URL's for filesize parameter.....or the filesize could be greater than 2GB/4GB
    Ref: http://php.net/manual/en/function.filesize.php

Topic Closed

This topic has been closed to new replies.

About this Topic