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
See all posts See thread Reply
$new_name_thumb = generate_thumb($file, $ext, $media_dir, $new_name, 105, false, "_thumb", "jpg"); $file_chmod = $media_dir . "/" . $new_name_thumb; chmod ($file_chmod, 0777); $new_name_thumb = generate_thumb($file, $ext, $media_dir, $new_name, 593, true, "_thumb_big", "jpg"); $file_chmod = $media_dir . "/" . $new_name_thumb; chmod ($file_chmod, 0777);
found the solution: CHMOD(...)