如何获取服务器上的磁盘空间? [英] How to get the disk space on a server?

查看:91
本文介绍了如何获取服务器上的磁盘空间?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我应该为一家公司用php开发一个Web应用程序,并且我需要知道服务器的磁盘可用空间.

I should to develop a web-application in php for a firm, and I need to know the disk free space of the server.

此刻,我能够获得这种可用的磁盘空间:

At the moment, I'm able to obtain the free disk space of this kind :

 $quota="104857600"; //100Mb : (100*1024*1024)

之后,我将$ quota和我的大小变量进行区别.

after, I do the difference between $quota and my size variable.

因此,在这种情况下,我必须直接在php文件中写入磁盘大小...

So, in this case, I must to write the disk size directly in the php file...

有可能做磁盘容量吗?

推荐答案

disk_free_space - Will return you the number of bytes available on the filesystem or disk partition.

disk_total_space -将返回总字节数(即容量)在文件系统或磁盘分区上.

disk_total_space - Will return you the number of total bytes (i.e. capacity) on the filesystem or disk partition.

这篇关于如何获取服务器上的磁盘空间?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆