What is the PHP disk_total_space() function?
The disk_total_space() function in
Syntax
disk_total_space(directory)
Parameters
directory: It is used to specify the name of the disk whose size we want to check.
Return value
It returns the total size in bytes of the specified directory. It returns false in case of failure.
Code
The basic PHP code to demonstrate the use of the disk_total_space() function is as follows:
<?phpecho disk_total_space("D:");?>
Explanation
The code above returns the total number of bytes in the D drive.