Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/235.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
SuPhp与无SuPhp脚本_Php_Suphp - Fatal编程技术网

SuPhp与无SuPhp脚本

SuPhp与无SuPhp脚本,php,suphp,Php,Suphp,我有一个错误,SUPPP激活时,没有问题,但SUPPP未激活时,我出现此错误 我想在这种情况下,服务器不支持imagewebp。 你知道如何解决这个问题吗 [26-Dec-2019 02:17:59 America/New_York] PHP Fatal error: Uncaught Error: Call to undefined function Catalog\Products\Classes\ClicShoppingAdmin\imagewebp() in {PATH}/Catalo

我有一个错误,SUPPP激活时,没有问题,但SUPPP未激活时,我出现此错误

我想在这种情况下,服务器不支持imagewebp。 你知道如何解决这个问题吗

[26-Dec-2019 02:17:59 America/New_York] PHP Fatal error:  Uncaught Error: Call to undefined function Catalog\Products\Classes\ClicShoppingAdmin\imagewebp() in {PATH}/Catalog/Products/Classes/ClicShoppingAdmin/ImageResample.php:101
我还想补充一点,中的图像已成功添加到具有
.jpg
扩展名的
“/sources/images/products/”
。相反,在成功上载is image的SUPPP服务器中,图像与
“.jpg.webp”
保存在同一位置。我猜在保存图像时,图像转换过程中出现了一些问题

多谢各位

这就是我的职责

第101行是:
imagewebp($this->image,$filename,$compression)

 public function save(string $filename, string $image_type = IMAGETYPE_WEBP, int $compression = 80, $permissions = null, bool $convertAll = true)
    {
      if ($convertAll === true) {
        imagewebp( $this->image, $filename, $compression );
      } else {
        if ($image_type == IMAGETYPE_JPEG) {
          imagejpeg($this->image, $filename, $compression);
        } elseif ($image_type == IMAGETYPE_GIF) {
          imagegif($this->image, $filename);
        } elseif ($image_type == IMAGETYPE_PNG) {
          imagepng($this->image, $filename);
        } elseif ($image_type == IMAGETYPE_WEBP) {
          imagewebp($this->image, $filename);
        }
      }

      if (!is_null($permissions)) {
        chmod($filename, $permissions);
      }
    }