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
require('../incfiles/class.upload.php'); $name = $user_id.'_'.($kol+1); $handle = new upload($_FILES['imagefile']); if ($handle->uploaded) { $handle->file_new_name_body = $name; $handle->allowed = $handle->allowed = array('image/jpeg','image/gif','image/png'); $handle->file_max_size = 1024 * 50; $handle->file_overwrite = true; $handle->image_resize = true; $handle->image_x = 128; $handle->image_y = 128; $handle->image_convert = 'gif'; $handle->process('../images/foto/'); if ($handle->processed) { mysql_query("..."); echo 'good'; else echo ($handle->error); $handle->clean();
when i try to upload image, i have that error:
No GIF create support
CHMOD to upoaded directory is fine (777)
my script: