posix_ttyname 获取控制台名称 getenv 获取环境变量 get_current_user 获取当前用户 proc_get_status 获取proc_open信息 get_cfg_var 获取PHP配置 disk_free_space 获取硬盘可用空间 disk_total_space 获取硬盘总空间 diskfreespace 同disk_free_space getcwd 获取当前活动目录 getlastmod 获取最后修改时间
scandir()函数可以用来浏览目录 目录操作函数 函数名 说明 mkdir 创建一个目录 rmdir 删除一个目录,该目录必须是空目录 getcwd 获取当前目录,用于相对路径 chdir 修改当前工作目录 disk_free_space
2核2G云服务器 每月9.33元起,个人开发者专属3年机 低至2.3折
5目录大小 disk_free_space(directory)disk_free_space() 函数返回目录中的可用空间disk_total_space(directory)disk_total_space
> //结果:d:/test/test.txt: 12 bytes 7、disk_free_space(); -- 返回目录中的可用空间 float disk_free_space ( string $ header("Content-Type:Text/html;charset=utf8"); $path = 'd:/test/test.txt'; $df = disk_free_space("d:/
ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,stream_socket_server,escapeshellcmd,dll,popen,disk_free_space
ini_restore,dl,openlog,syslog,readlink,symlink, popepassthru,stream_socket_server,escapeshellcmd,dll,popen,disk_free_space
chown — 改变文件的所有者 clearstatcache — 清除文件状态缓存 copy — 拷贝文件 delete — 参见 unlink 或 unset dirname — 返回路径中的目录部分 disk_free_space — 返回目录中的可用空间 disk_total_space — 返回一个目录的磁盘总大小 diskfreespace — disk_free_space 的别名 fclose — 关闭一个已打开的文件指针
ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,stream_socket_server,escapeshellcmd,dll,popen,disk_free_space ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,stream_socket_server,escapeshellcmd,dll,popen,disk_free_space ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,stream_socket_server,escapeshellcmd,dll,popen,disk_free_space ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,stream_socket_server,escapeshellcmd,dll,popen,disk_free_space ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,stream_socket_server,escapeshellcmd,dll,popen,disk_free_space
./")); // bool(true) var_dump(disk_free_space("./")); // float(7727517696) var_dump(disk_total_space( disk_free_space() 和 disk_total_space() 则是获取指定目录的剩余磁盘空间和总的磁盘空间数据的函数。
file() fgetss() fgets() fgetcsv() fgetc() fflush() feof() fclose() diskfreespace() disk_total_space() disk_free_space
HumanReadableFilesize(disk_total_space("/")); } function freeSpace() { echo HumanReadableFilesize(disk_free_space
扫码关注腾讯云开发者
领取腾讯云代金券