Home> php教程> php手册> body text

php disk_free_space 返回目录可用空间

WBOY
Release: 2016-06-06 20:33:48
Original
1297 people have browsed it

disk_free_space返回目录可用空间,这个可根据你当关硬盘的空间大小来判断

用法

disk_free_space($path);

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

本函数功能

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

好了实例是很简单我们就来看看实例吧.
代码如下:
$jb51net = disk_free_space("/");
echo $jb51net;
?>


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

返回的是文件系统或磁盘分区返回可用的字节数
Related labels:
php
source:php.cn
Statement of this Website
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
Popular Recommendations
    Latest Downloads
    More>
    Web Effects
    Website Source Code
    Website Materials
    Front End Template
    About us Disclaimer Sitemap
    php.cn:Public welfare online PHP training,Help PHP learners grow quickly!