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
$folder="../produkter"; $handle = new Upload($_FILES['image']); if ($handle->uploaded) { $handle->allowed = array('image/jpg'); $handle->file_new_name_body = $bildnamn; $handle->file_overwrite = true; $handle->file_auto_rename = false; $handle->image_resize = true; $handle->image_ratio = true; $handle->image_y = 600; $handle->image_x = 600; $handle->jpeg_quality = 95; $handle->Process($folder);
I've tried:
it worked fine before i put the allowed line in. ???