Check server space in php
I have a domain name like 'mydomain.com'. I want to check how much space available on server with this domain name with the help of php. Like for our hard drive we Show asked Dec 6, 2012 at 11:44
Depending on the structure of the file system you can use something like the following for Linux hosts:
Or in your case it sounds like you're running on Windows so:
answered Dec 6, 2012 at 11:49
PeterJPeterJ 3,62423 gold badges51 silver badges67 bronze badges 0 The main function is used to get space available is same as above said. you have to use
answered Dec 7, 2012 at 9:10
PremPrem 6973 silver badges10 bronze badges 1 use php disk_free_space("/"); it Returns available space on filesystem or disk partition answered Dec 6, 2012 at 11:48
Not the answer you're looking for? Browse other questions tagged php or ask your own question.(PHP 4 >= 4.1.0, PHP 5, PHP 7, PHP 8) disk_free_space — Returns available space on filesystem or disk partition Descriptiondisk_free_space(string Parametersdirectory A directory of the filesystem or disk partition.
Return Values Returns the number of available bytes as
a float or ExamplesExample #1 disk_free_space() example
Notes
wiede at gmx dot net ¶ 11 years ago
Anonymous ¶ 8 years ago
sam ¶ 13 years ago
Nitrogen ¶ 15 years ago
Jawira Portugal ¶ 8 months ago
somedude ¶ 5 years ago
Matthieu S ¶ 5 years ago
pavel at sunhater dot com ¶ 3 years ago
$options !== null) |