简体   繁体   English

Imagick:无法打开文件

[英]Imagick: unable to open file

When simply calling the Imagick class: 当简单地调用Imagick类时:

$image = new Imagick('/images/magick/atmsk.png');

I get the error message: 我收到错误消息:

Fatal error: Uncaught exception 'ImagickException' with message 'unable to open file `/images/magick/atmsk.png' @ png.c/ReadPNGImage/2889' in .../imag.php:4 Stack trace: #0 .../imag.php(4): Imagick->__construct('/images/magick/...') #1 {main} thrown in .../imag.php 致命错误:未捕获的异常'ImagickException',消息'无法打开文件`/image/magick/atmsk.png'@ png.c / ReadPNGImage / 2889'in ... / imag.php:4堆栈跟踪:#0。 ../imag.php(4):Imagick - > __ construct('/ images / magick / ...')#1 {main}抛入... / imag.php

I have checked memory available as per another posting here and that is ok! 我已根据另一个帖子检查了内存,这没关系!

使用图像的完整路径,例如:

$image = new Imagick($_SERVER['DOCUMENT_ROOT'] . '/images/magick/atmsk.png');

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM