致命错误:未捕获错误:在wordpress自定义插件中找不到类“ Imagick”

时间:2019-03-18 08:07:43

标签: php wordpress

我正在创建wordpress自定义插件,因此我将使用“ imagick”类。这是我的自定义插件php文件中使用的示例代码:

dept_name

但是在该代码中我有一个错误,例如: 致命错误:未捕获错误:未找到类“ Imagick” ...


1 个答案:

答案 0 :(得分:1)

Fatal error: Uncaught Error: Class 'Imagick' not found

It means that this class is not defined and therefore cannot be found.

Imagick是本地php扩展。

您需要确保此扩展名存在于您的服务器上并已配置。 为此,您可能需要托管服务提供商的帮助,或者如果您有权完全访问服务器,请自行安装。

使用以下代码创建php文件:

<?php
phpinfo();

运行它。它应该显示服务器上所有现有的和可用的扩展。检查Imagick的值。