cavendano Posted September 5, 2007 Share Posted September 5, 2007 I need to get a script to post the file size of different files as they are created in the script. I think the problem lies in the dir_url_mp4 when i had it echoed it comes out as: /hsphere/local/home/removed/removed.com/tones/temp/L84q172Jq.m4a $sname is a file variable that will tell the script what file I am wanting to get the information for and it works as you can see from the echo on top it echoed the variable L84q172Jq. the url_mp4 works great so its mainly the get_size_mp4 that will not display the file size $dir_url_mp4 = $root.'/temp/'.$sname.'.m4a'; $get_size_mp4 = filesize($dir_url_mp4,Bytes); $url_mp4 = $root_url."/temp/".$sname.".m4a"; Thanks! When I had Quote Link to comment https://forums.phpfreaks.com/topic/68098-what-am-i-doing-wrong/ Share on other sites More sharing options...
trq Posted September 5, 2007 Share Posted September 5, 2007 filesize only accepts one argument, a string. $get_size_mp4 = filesize($dir_url_mp4); Quote Link to comment https://forums.phpfreaks.com/topic/68098-what-am-i-doing-wrong/#findComment-342289 Share on other sites More sharing options...
cavendano Posted September 5, 2007 Author Share Posted September 5, 2007 I had already tried that code you provided but thanks. It still doesnt give me a file size value. Quote Link to comment https://forums.phpfreaks.com/topic/68098-what-am-i-doing-wrong/#findComment-342323 Share on other sites More sharing options...
cavendano Posted September 6, 2007 Author Share Posted September 6, 2007 ok i figured out if i just type in the file name it provides me the size but it has to be in the same directory....is there anyway of doing it with a file in a different directory? Quote Link to comment https://forums.phpfreaks.com/topic/68098-what-am-i-doing-wrong/#findComment-342909 Share on other sites More sharing options...
wildteen88 Posted September 6, 2007 Share Posted September 6, 2007 Provide the full/relative path to the file you want to get the filesize off. The file doesn't have to be in the same directory as the script. Quote Link to comment https://forums.phpfreaks.com/topic/68098-what-am-i-doing-wrong/#findComment-343040 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.