
- PHP 7 Tutorial
- PHP 7 - Home
- PHP 7 - Introduction
- PHP 7 - Performance
- PHP 7 - Environment Setup
- PHP 7 - Scalar Type Declarations
- PHP 7 - Return Type Declarations
- PHP 7 - Null Coalescing Operator
- PHP 7 - Spaceship Operator
- PHP 7 - Constant Arrays
- PHP 7 - Anonymous Classes
- PHP 7 - Closure::call()
- PHP 7 - Filtered unserialize()
- PHP 7 - IntlChar
- PHP 7 - CSPRNG
- PHP 7 - Expectations
- PHP 7 - use Statement
- PHP 7 - Error Handling
- PHP 7 - Integer Division
- PHP 7 - Session Options
- PHP 7 - Deprecated Features
- PHP 7 - Removed Extensions & SAPIs
- PHP 7 Useful Resources
- PHP 7 - Quick Guide
- PHP 7 - Useful Resources
- PHP 7 - Discussion
disk_total_space() function in PHP
The disk_total_space() function returns the total size of a directory. It returns the total number of bytes of a directory.
Syntax
disk_total_space(dir_name)
Parameters
dir_name − Specify the name of the directory.
Return
The disk_total_space() function returns the total available space in bytes.
Example
<?php echo disk_total_space("/home/"); ?>
Output
944459485184
Let us see another example.
Example
<?php $total_space = disk_total_space("/home/"); echo "Total Available Space: $total_space"; ?>
Output
Total Available Space: 944459485184
- Related Articles
- Find free disk space using Java
- Find free disk space using C#
- Tracking Down Where Disk Space Has Gone on Linux
- PHP Global space
- How to check total space and available space in Linux using the terminal?
- Get the total space of this partition in Java
- Can I query how much disk space certain rows or columns are taking up in MySQL?
- Checking data disk, log disk and Trace disk in SAP HANA
- strcmp() function in PHP
- strcoll() function in PHP
- strcspn() function in PHP
- strip_tags() function in PHP
- stripcslashes() function in PHP
- stripos() function in PHP()
- stristr() function in PHP
- stripslashes() function in PHP

Advertisements