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