PHP disk_total_space() Function
In this chapter you will learn:
- Definition for PHP disk_total_space() Function
- Syntax for PHP disk_total_space() Function
- Parameter for PHP disk_total_space() Function
- Return for PHP disk_total_space() Function
- Example - Get the total space, in bytes, for C: drive
Definition
The disk_total_space() function returns the total space, in bytes, of the specified directory.
Syntax
PHP disk_total_space() Function has the following syntax.
disk_total_space(directory)
Parameter
Parameter | Is Required | Description |
---|---|---|
directory | Required. | Directory to check |
Return
PHP disk_total_space() Function returns the total space, in bytes, of the specified directory.
Example
returns the total space, in bytes, for C: drive.
<?php
echo disk_total_space("C:");
?>
The code above generates the following result.
Next chapter...
What you will learn in the next chapter:
- Definition for PHP diskfreespace() Function
- Syntax for PHP diskfreespace() Function
- Parameter for PHP diskfreespace() Function
- Example - Get the free space, in bytes, for C: drive
Home » PHP Tutorial » PHP File Functions