0

Hi I am getting error this error while upload image?
Error:Fatal error: Class 'Image' not found

Code:

$gallerycate_img            =   "gallerycateimg/".$_FILES["txt_photo"]["name"];
                    $gallerycate_image          =   $_FILES['txt_photo']['name'];

                    if (($_FILES["txt_photo"]["type"] == "image/jpeg")||($_FILES["txt_photo"]["type"] == "image/jpg")||($_FILES["txt_photo"]["type"] == "image/gif")||($_FILES["txt_photo"]["type"] == "image/png")&& ($_FILES["txt_photo"]["size"] < 200000000))
                    {
                             move_uploaded_file($_FILES["txt_photo"]["tmp_name"], "../gallerycateimg/" .$_FILES["txt_photo"]["name"]);              
                            copy("../".$gallerycate_img, "../gallerycateimg/thumb/".$gallerycate_image);
                            $file_thumb="../gallerycateimg/thumb/".$gallerycate_image;
                            $file_thumb_1="gallerycateimg/thumb/".$gallerycate_image;
                            $img = new Image($file_thumb);
                            $size = $img->getSize();
                            if($size['width']>350) $img->resize(350)->save();
                            elseif($size['height']>300) $img->resize(null, 250)->save();

Edited by AntonyRayan

2
Contributors
1
Reply
7
Views
2 Years
Discussion Span
Last Post by pritaeas
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.