0

我收到一个我从未见过的错误...

Catchable fatal error: Object of class SimpleImage could not be converted to string in /home/content/44/8713044/html/admin/classes/SimpleImage.php on line 10

我正在使用这个名为 SimpleImage 的插件

http://www.white-hat-web-design.co.uk/blog/resizing-images-with-php/

我不知道为什么我会收到这个错误,这个插件的作用是它需要和图像,调整它的大小并将它上传到服务器,有没有人知道我为什么会收到这个错误以及如何修复它?

谢谢,J

这是发生错误的地方......

   function load($filename) {

      $image_info = getimagesize($filename);
      $this->image_type = $image_info[2];
      if( $this->image_type == IMAGETYPE_JPEG ) {

         $this->image = imagecreatefromjpeg($filename);
      } elseif( $this->image_type == IMAGETYPE_GIF ) {

         $this->image = imagecreatefromgif($filename);
      } elseif( $this->image_type == IMAGETYPE_PNG ) {

         $this->image = imagecreatefrompng($filename);
      }
   }
4

0 回答 0