PHP disk_free_space()函数 函数 disk_free_space() 可以返回指定目录的剩余空间,单位为字节。 语法 float disk_free_space ( string $directory )PHPCopy 给定一个包含目录的字符串,disk_free_space() 函数可以返回对应文件系统或磁盘分区上可用的字节数。 示例 <?php echo disk_free_space("C:"); echo "\n"; echo disk_free_space("E:"); ?gt;PHPCopy 输出 224150941696 209571344384PHPCopy