How to use Filesystem disk free space in PHP

In this article I am going to explain about disk_free_space function in PHP.
  • 1534

PHP disk_free_space() function

The filesystem disk_free_space function is used to returns available space in directory.

Syntax of disk_free_space function

disk_free_space(directoryName)

Parameters in disk_free_space function

It has only one parameter:

Parameter Description
directoryName It specifies directory name.

Example of filesystem disk_free_space function

<html>

<body>
 

<?php

echo "Free space in Disk C is ";

echo disk_free_space("C:");

echo "</br>";

echo "Free space in Disk D is ";

echo disk_free_space("D:");

?>
 

</body>

</html>


Output:

diskfreespace function.jpg

You may also want to read these related articles :
here

Ask Your Question 

Got a programming related question? You may want to post your question here

Programming Answers here

Categories

More Articles

© 2020 DotNetHeaven. All rights reserved.