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