Page 1 of 1
How to find disk space using php?
Posted: Wed Apr 29, 2009 6:45 am
by rajsekar2u
Hi all,
Is there any way to find disk space usage using php in server side.
disk_total_space() By this i can able find the space in local.
How to find in server side .
Thanks in advance
Re: How to find disk space using php?
Posted: Wed Apr 29, 2009 7:33 am
by Mark Baker
disk_total_space() By this i can able find the space in local.
What makes you think disk_total_space() returns the space on a local/client drive rather than on the server?
Code: Select all
$disk_used_space = disk_total_space('/') - disk_free_space('/');
Re: How to find disk space using php?
Posted: Thu Apr 30, 2009 6:06 am
by rajsekar2u
it showing me error:
Warning: disk_free_space() [function.disk-free-space]: open_basedir restriction in effect. File(/) is not within the allowed path(s): (/home/sanssan:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/sanssan/public_html/test.php on line 6