class.upload.php is a powerful and mature PHP class to manage uploaded files, and manipulate images in many ways. The script is available under a GPL license.
OK, here is an expertise question for 10 points: I know this upload class uses automatic file permission change and then upload, but the thing is our server does not allow PHP chmod function (I don't know how). To change file permissions you have to connect with FTP. It's OK, because I can use ftp functions in PHP to connect, change file permission to 777, upload files, then change file permissions back to 755. But newly created (by class.upload) directories' owner is not the same user that I connect to server, so, I can NOT chmod new directories to 755.
Any solutions?