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()? 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). 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 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 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. 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 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. Link to comment https://forums.phpfreaks.com/topic/137114-solved-filesize/#findComment-716228 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.