How to use PHP & Check Disk/Drive Space Learn how to use the PHP to Check Disk/Drive Space
ShotDev Focus:
- PHP & Check Disk/Drive Space
Example
php_check_disk.php
<html> <head> <title>ShotDev.Com Tutorial</title> </head> <body> <?php echo "Drive C: Disk Total Space = ".number_format(disk_total_space("C:")/1024/1024/1024,2)." GB<br>"; echo "Drive C: Disk Free Space = ".number_format(diskfreespace("C:")/1024/1024/1024,2)." GB<br>"; ?> </body> </html>
Create a php file and save to path root-path/myphp/
Run
http://localhost/myphp/php_check_disk.php
Screenshot