小编Kri*_*for的帖子

未捕获的异常'ImagickException',消息'无法读取文件'

我用imagick模块3.1.0RC2运行PHP 5.4.30.phpinfo()确实将模块显示为已加载,phpinfo()将PDF显示为支持的格式.

运行时:

$image = new Imagick();
$image->readImage('./test.pdf');
Run Code Online (Sandbox Code Playgroud)

我收到:

Fatal error: Uncaught exception 'ImagickException' with message 'Unable to read the file: ./test.pdf'

当我将图像类型更改为JPEG并读取时'./test.jpg'不返回错误.权限已经过检查,并且已经测试了不同的PDF.我已经插入了图像的绝对路径,但仍然抛出异常.此示例的图像与脚本一起放在同一目录中.我错过了什么?

php pdf imagick

4
推荐指数
1
解决办法
4245
查看次数

标签 统计

imagick ×1

pdf ×1

php ×1