Home > php教程 > php手册 > Introduction to php disk_free_space and disk_total_space examples

Introduction to php disk_free_space and disk_total_space examples

WBOY
Release: 2016-10-28 15:03:31
Original
1360 people have browsed it

php disk_free_space function and disk_total_space function tutorial, the first function refers to the space returned by the function, in bytes, in the specified directory, and the disk_total_space function returns the total space

Definition and Usage

The disk_free_space() function returns the free space, in bytes, in the specified directory.

Grammar:

<span style="color: #008080">disk_free_space</span>(directory)  
Copy after login

Let’s take a look at the disk_free_space instance.

<?<span style="color: #000000">php  
</span><span style="color: #008000">//</span><span style="color: #008000"> by http://www.manongjc.com/article/1324.html  </span>
<span style="color: #0000ff">echo</span> <span style="color: #008080">disk_free_space</span>("C:"<span style="color: #000000">);  
</span>?>  
Copy after login

Output the size of your hard drive.

12312312313  
Copy after login

Let’s take a look at the tutorial on the disk_total_space function.

Definition and Usage

The disk_total_space() function returns the total space, in bytes, in the specified directory.

Grammar

<span style="color: #008080">disk_total_space</span>(directory) 
Copy after login

Example:

<?<span style="color: #000000">php   
</span><span style="color: #008000">//</span><span style="color: #008000"> by http://www.manongjc.com/article/1324.html  </span>
<span style="color: #0000ff">echo</span> <span style="color: #008080">disk_total_space</span>("C:"<span style="color: #000000">);  
</span>?>  
Copy after login

The method is the same as disk_free_space.

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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template