Retrieve the amount of free space, in bytes, available on the C: drive.
| <?php echo disk_free_space(“C:”); ?> |
The result of the code above might be:
| 109693288448 |
The disk_free_space() function returns the available free space, in bytes, of the specified filesystem or disk.
Tip: Use disk_total_space() to find the total size of a filesystem or disk.
| disk_free_space(directory) |
|
Parameter |
Description |
|
directory |
Mandatory. Specifies the filesystem or disk to be checked. |
|
Return Value: |
Returns the amount of free space in bytes on success, or FALSE on failure. |
|
PHP Version: |
4.1+ |