PHP disk_total_space() Function
❮ PHP Filesystem ReferenceExample
Return the total size, in bytes, of the C: directory:
<?php
echo disk_total_space("C:");
?>
The output of the code above could be:
119990349824
Definition and Usage
The disk_total_space() function returns the total size, in bytes, of the specified filesystem or disk.
Tip: Look at the disk_free_space() to get the free space of a filesystem or disk.
Syntax
disk_total_space(directory)
Parameter Values
Parameter | Description |
---|---|
directory | Required. Specifies the filesystem or disk to check |
Technical Details
Return Value: | The number of total size (in bytes) on success, FALSE on failure |
---|---|
PHP Version: | 4.1+ |
❮ PHP Filesystem Reference
Copyright 1999-2023 by Refsnes Data. All Rights Reserved.