The example Shows of disk_free_space() function in php Program. In this section you will find the example code of disk_free_space() function.
The disk_free_space() function in PHP is used to find the Hard Disk's free space from the PHP program. The disk_free_space() function returns the available free space in the bytes.
syntax of disk_free_space() function in PHP
disk_free_space(directory_path)
It gives the free space present on the disk in bytes. It works in php4 and php5.
Here is the code example.
Code for disk_free_space() function in PHP
<?php
$space1=disk_free_space("c:\\xampp");
echo $space1;
?>
Output
57459314688
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.