Home  >  Article  >  php教程  >  php disk_free_space 返回目录可用空间_php基础

php disk_free_space 返回目录可用空间_php基础

WBOY
WBOYOriginal
2016-05-17 09:01:452083browse

用法

disk_free_space($path);

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

本函数功能

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

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

复制代码 代码如下:

$jb51net = disk_free_space("/");
echo $jb51net;
?>


复制代码 代码如下:

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

返回的是文件系统或磁盘分区返回可用的字节数
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn