导航首页 »  技术教程 »  php disk_free_space 返回目录可用空间
php disk_free_space 返回目录可用空间 1043 2023-12-09   

用法

disk_free_space($path);

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

本函数功能

本函数将根据相应的文件系统或磁盘分区返回可用的字节数

好了实例是很简单我们就来看看实例吧.

<?php
$gimoonet = disk_free_space("/");
echo $gimoonet;
?>



<?php
// $df 包含根目录下可用的字节数
$df = disk_free_space("/");
//在 Windows 下:
disk_free_space("C:");
disk_free_space("D:");
?>

返回的是文件系统或磁盘分区返回可用的字节数


文章评论 (0条)
发表评论
暂无评论,快来抢沙发吧~