[SOLVED] Disk space...
Moderator: General Moderators
[SOLVED] Disk space...
Is it possible to tell how much disk space I have used using PHP. If so, how?.
Yeah, like how much space all of my website files are using. disk_total_space() is a big no no, however using this little snippet I made is useful:
All I need to do now is parse out the dir name, and calculate the overall size. Arrays and regular expressions should hopefully work 
Any other suggestions?.
Code: Select all
echo nl2br(str_replace(" ", " ", shell_exec("du -chx ".$_SERVERї'DOCUMENT_ROOT'])));Any other suggestions?.