The disk_total_space() function returns the total size of a directory. It returns the total number of bytes of a directory.
Syntax
disk_total_space(dir_name)
Parameters
dir_name − Specify the name of the directory.
Return
The disk_total_space() function returns the total available space in bytes.
Example
<?php
echo disk_total_space("/home/");
?>Output
944459485184
Let us see another example.
Example
<?php
$total_space = disk_total_space("/home/");
echo "Total Available Space: $total_space";
?>Output
Total Available Space: 944459485184