well I need php to get filesize from a file in a different directory. <?php $root = dirname(__FILE__); $root_url = "http://mobilereelz.com/tones"; $sname = "0Sre4dwn4"; $dir_url_mp4 = $root.'/temp/'.$sname.'.m4a'; $get_size_mp4 = filesize("0Sre4dwn4.m4a"); $url_mp4 = $root_url."/temp/".$sname.".m4a"; $dir_test_mp4 = '/temp/'.$sname.'.m4a'; $dir_test = '/local/home/cavendan/mobilereelz.com/tones/temp/'.$sname.'.m4a'; echo $dir_url_mp4; echo $url_mp4; echo $dir_test_mp4; echo $get_size_mp4; ?> PHP: As you can see alot of the variables are the same I was just playing around with them to find out which would work. $get_size_mp4 = filesize("0Sre4dwn4.m4a"); works right now but only if I put this php file in the same folder...I need filesize to tell me the filesize but from a file in a different folder. I tried: $get_size_mp4 = filesize("temp/0Sre4dwn4.m4a"); and that doesnt work any help is appreciated
It does work, you probably put either the path wrong, or the filename (which is case-sensitive on UNIX systems). When you used this: $get_size_mp4 = filesize("temp/0Sre4dwn4.m4a"); PHP: Are you sure the path was temp/0Sre4dwn4.m4a or was it maybe: /temp/0Sre4dwn4.m4a (with a leading slash) ?
your a genius! that worked...you'd be surprised how either people ignored my question or couldnt answer it themselves