How to image resize using php?

前端 未结 2 2097
有刺的猬
有刺的猬 2021-01-17 05:46

Image retrieve from database and copy image in another folder with same name and image resize with 150x150.

I don\'t know where is actuall problem in fatching image

2条回答
  •  甜味超标
    2021-01-17 06:46

    
    

    change you php code like below: try it

        $s=mysql_query("select * from photo_gallery where image_id = '".$image_id."'");
        $r = mysql_fetch_array($s);
    
        $filename = 'user_data/'.$r['image_name'];
    
        image_resize($filename,$filename."_thumbnail.jpg","150","150"); //how to use
    
        echo 'orginial image is '.$filename.'
    thumbnail is '.$filename."_thumbnail.jpg";

提交回复
热议问题