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.
more info about the class
$handle = new My_OSC_Upload($_FILES['form_field']); $handle->process(); echo $handle->log;
class upload {
function upload($file, $lang = 'en_GB') {
class My_OSC_Upload {
function My_OSC_Upload($file, $lang = 'en_GB') {
Let's say that the class is named My_OSC_Upload. You would then instantiate the class as following:
One thing thought, don't forget to also rename the constructor of the class if you change its name. So you have to change in two places:
and
becomes
and