dafallenangel Posted December 15, 2008 Share Posted December 15, 2008 Quick n00b question.. ??? is there away i can have my .php page not inside the directory of the file that i am wanting to file size using filesize()? Quote Link to comment https://forums.phpfreaks.com/topic/137114-solved-filesize/ Share on other sites More sharing options...
genericnumber1 Posted December 15, 2008 Share Posted December 15, 2008 Yeah, you can browse directories as if you were at a command line. Go up one directory with ".." as in "../../twodirectoriesup.txt" or down directories just by typing them out "deeperdir/evendeeperdir/file.txt". Or you could just use absolute file paths with "/home/user/htdocs/file.txt" (on unix). Quote Link to comment https://forums.phpfreaks.com/topic/137114-solved-filesize/#findComment-716210 Share on other sites More sharing options...
dafallenangel Posted December 15, 2008 Author Share Posted December 15, 2008 Yeah, you can browse directories as if you were at a command line. Go up one directory with ".." as in "../../twodirectoriesup.txt" or down directories just by typing them out "deeperdir/evendeeperdir/file.txt". Or you could just use absolute file paths with "/home/user/htdocs/file.txt" (on unix). thanx Quote Link to comment https://forums.phpfreaks.com/topic/137114-solved-filesize/#findComment-716212 Share on other sites More sharing options...
dafallenangel Posted December 15, 2008 Author Share Posted December 15, 2008 err im getting Warning: filesize() [function.filesize]: stat failed for ../upload/download/test.zip in *** on line 56 0 B Quote Link to comment https://forums.phpfreaks.com/topic/137114-solved-filesize/#findComment-716217 Share on other sites More sharing options...
corbin Posted December 15, 2008 Share Posted December 15, 2008 That means either permission is denied or the file path doesn't exist. Quote Link to comment https://forums.phpfreaks.com/topic/137114-solved-filesize/#findComment-716218 Share on other sites More sharing options...
dafallenangel Posted December 15, 2008 Author Share Posted December 15, 2008 That means either permission is denied or the file path doesn't exist. well i got the download folder set at 777 and i know the directory and stuff is there Quote Link to comment https://forums.phpfreaks.com/topic/137114-solved-filesize/#findComment-716223 Share on other sites More sharing options...
genericnumber1 Posted December 15, 2008 Share Posted December 15, 2008 try <?php echo realpath('../upload/download/test.zip'); ?> and compare it to your file explorer's path. Quote Link to comment https://forums.phpfreaks.com/topic/137114-solved-filesize/#findComment-716228 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.