PHP disk_total_space() Function
Definition and Usage
The disk_total_space() function returns the total disk size of the specified directory.
Syntax
disk_total_space(directory)
Parameter | Description |
---|---|
directory | Required. Specifies the directory to be checked. |
Description
directory The parameter is a string of a directory. This function returns all the bytes according to the corresponding file system or disk partition.
Tips and Comments
Tip:This function returns the total size of the disk partition where the directory is located, so the result obtained by using the same disk partition as a parameter in different directories is completely the same. It is supported to load a disk partition as a subdirectory in Unix and Windows 200x/XP, and it is very meaningful to use this function correctly in this case.
Example
<?php echo disk_total_space("C:\"); ?>
Output similar to this:
509693888668