Good day!
In my system ,every user has a directory,and i want to limit the user's directory's size,for example:the limited size is 10M ,when user upload a file ,if his or her directory size is over 10M,he can not upload file sucessfully.
Please give me a advise.
In my system ,every user has a directory,and i want to limit the user's directory's size,for example:the limited size is 10M ,when user upload a file ,if his or her directory size is over 10M,he can not upload file sucessfully.
Please give me a advise.

Re: how to check the upload directory's size?
function getDirectorySize($path) { $totalsize = 0; $totalcount = 0; $dircount = 0; if ($handle = opendir ($path)) { while (false !== ($file = readdir($handle))) { $nextpath = $path . '/' . $file; if ($file != '.' && $file != '..' && !is_link ($nextpath)) { if (is_dir ($nextpath)) { $dircount++; $result = getDirectorySize($nextpath); $totalsize += $result['size']; $totalcount += $result['count']; $dircount += $result['dircount']; } elseif (is_file ($nextpath)) { $totalsize += filesize ($nextpath); $totalcount++; } } } } closedir ($handle); $total['size'] = $totalsize; $total['count'] = $totalcount; $total['dircount'] = $dircount; return $total; }Add it to your config.php and check the size of the userdirectory within CheckAuthentication().