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
The disk_free_space() function returns the free space, in bytes, in the specified directory.
<span style="color: #008080">disk_free_space</span>(directory)
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>?>
Output the size of your hard drive.
12312312313
Let’s take a look at the tutorial on the disk_total_space function.
The disk_total_space() function returns the total space, in bytes, in the specified directory.
<span style="color: #008080">disk_total_space</span>(directory)
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>?>
The method is the same as disk_free_space.