PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
It's possible by PHP code to limit size of a directory on server ? E.g. My dir /home/umbumbym/public_html/mark (only /mark of course) must contain max 5 Mbyte ...
Can I insert a little script that verify the dir content (files and subdir) and calculate the byte amount and allows or not other uploads ...
It is possible ?
yes, you can use the [php_man]opendir()[/php_man] or [php_man]glob()[/php_man] (newer php required) to obtain a file list and iterate through them getting sizes of each.