- Trending Categories
- 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
disk_total_space() function in PHP
The disk_total_space() function returns the total size of a directory. It returns the total number of bytes of a directory.
Syntax
disk_total_space(dir_name)
Parameters
dir_name − Specify the name of the directory.
Return
The disk_total_space() function returns the total available space in bytes.
Example
<?php echo disk_total_space("/home/"); ?>
Output
944459485184
Let us see another example.
Example
<?php $total_space = disk_total_space("/home/"); echo "Total Available Space: $total_space"; ?>
Output
Total Available Space: 944459485184
Advertisements