PHP  
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
search for in the  
<disk_free_spacediskfreespace>
Last updated: Mon, 16 Jul 2012

disk_total_space

(PHP 4 >= 4.1.0, PHP 5)

disk_total_space -- 返回一个目录的磁盘总大小

说明

float disk_total_space ( string directory )

给出一个包含有一个目录的字符串,本函数将根据相应的文件系统或磁盘分区返回所有的字节数。

例子 1. disk_total_space() 例子

<?php
// $df 包含 "/" 目录的磁盘大小
$df = disk_total_space("/");
?>

注: 本函数不能作用于远程文件,被检查的文件必须通过服务器的文件系统访问。

参见 disk_free_space()

【译者注】本函数返回的是该目录所在的磁盘分区的总大小,因此在给出同一个磁盘分区的不同目录作为参数所得到的结果完全相同。在 UNIX 和 Windows 2000 中都支持将一个磁盘分区加载为一个子目录,这时正确使用本函数就很有意义。




<disk_free_spacediskfreespace>
 Last updated: Mon, 16 Jul 2012
 
Copyright © 2001-2005 The PHP Group
All rights reserved.
This unofficial mirror is operated at: http://manual.phpv.net/
Last updated: Thu Jul 7 19:13:47 2005 CST