hello, i read somewhere that there is a script on phpbuilder that can help to limit the size of a directory. im lending web space to my friend an i want to limit it using a script since i cant do it through my host. i want it so that if a directory is over the size limit then anyone that tries to access any files from that directory will be redirected somewhere else. can you guys help me? I looked through the Code Library and I couldn't really find it.
Have a look over at Hotscripts.com i dont think your going to find anything though.
sure, but how are people upload via website or ftp?
if they are uplaod via website and they over a LIMIT of MB in a folder you can have PHP check for that before upload a file.
people would upload over FTP, not website. thanks zapa!
planetsim: I read in a forum somewhere i forgot and someone posted that they found this script @ phpbuilder.com
neono else?
what you'll have to do is read through the directory and total up the sizes of all the files. If you want it to be strict you'll also have to read through all of the subdirectories and do the same thing. I answered a question about counting the files in a directory. The code that I posted for that will work for you with just a little modifycation. http://www.phpbuilder.net/board/showthread.php?s=&threadid=10280290&highlight=count+files