English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

Basic PHP Tutorial

Advanced PHP Tutorial

PHP & MySQL

PHP Reference Manual

PHP disk_total_space() Function Usage and Example

PHP Filesystem Reference Manual

The disk_total_space() function can return the total space of the specified directory (in bytes).

Syntax

float disk_total_space ( string directory )

Given a string containing a directory, the disk_total_space() function can return the total byte count on the corresponding filesystem or disk partition.

Online Example

<?php
   echo disk_total_space("C:\");
   echo "\n";
   echo disk_total_space("E:\");
?>

Output Result

277320036352
209714147328

PHP Filesystem Reference Manual