disk_free_space() function in PHP

PHPProgrammingServer Side Programming

The disk_free_space() function returns directory’s free space in bytes.

Syntax

disk_free_space(dir_name);

Parameters

  • dir_name − Specify the name of the directory.

Return

The disk_free_space() function returns bytes of available space in a file. It returns false on failure.

Example

 Live Demo

<?php
   echo disk_free_space("/home/");
?>

Output

832806768640
raja
Published on 03-Oct-2018 12:12:47
Advertisements