The disk_total_space() function returns the total space, in bytes, of the specified directory.
PHP disk_total_space() Function has the following syntax.
disk_total_space(directory)
Parameter | Is Required | Description |
---|---|---|
directory | Required. | Directory to check |
PHP disk_total_space() Function returns the total space, in bytes, of the specified directory.
returns the total space, in bytes, for C: drive.
<?php
echo disk_total_space("C:");
?>
The code above generates the following result.