- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
diskfreespace() function in PHP
The diskfreespace() function returns the available free space in a directory and is an alias of disk_free_space().
Syntax
diskfreespace(dir_name)
Parameters
dir_name − Directory to be specified.
Return
The diskfreespace() function returns the free space in bytes.
Example
<?php echo diskfreespace("/home/"); ?>
Output
832931168256
Let us see another example.
Example
<?php $free_space = diskfreespace("/home/"); echo "Free Space: $free_space"; ?>
Output
Free Space: 832931168256
Advertisements