and like us on FB

On a member-based site we operate we put a limit on the size of a directory before additional credit is required. The following function will recursively look through an entire directory and return a filesize. While the value returned is in bytes, you can alter it into a human readable string by using the first function from this article (“Return a Readable Filesize with PHP”).

The PHP Function

Usage is as follows:

Download

Title: Return the Size of an Entire Directory with PHP
Description: Return the Size of an Entire Directory with PHP.
Download: PHP Code (V0.2) | Plugin Page

Shortt URL for this post: http://shor.tt/Zr3