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

PHP 基础教程

PHP 高级教程

PHP & MySQL

PHP 参考手册

PHP disk_free_space() 函数用法及示例

PHP Filesystem 参考手册

The disk_free_space() function can return the available space for the specified directory (in bytes).

Syntax

float disk_free_space ( string $directory )

Given a string containing a directory, the disk_free_space() function can return the number of available bytes on the corresponding file system or disk partition.

在线示例

<?php
   echo disk_free_space("C:\");
   echo "\n";
   echo disk_free_space("E:\");
?gt;

输出结果

224150941696
209571344384

PHP Filesystem 参考手册