$file_path = $this->filePath.'d/'.$this->compId.'/'.$data->project_id.'/'.$result[0]->file_name;
$im = new Imagick();
$im->pingImage($file_path);
我无法使用上述代码获取pdf文件响应。
错误: - 致命错误:未捕获的异常'ImagickException' 消息'无法读取文件' /srv/www/api.proofhub.com/public_html/application/core/v2/proof.php:114
堆栈跟踪: #0 /srv/www/api.proofhub.com/public_html/application/core/v2/proof.php(114): Imagick-> pingimage( '/ SRV /网络/ api.pr ...')
答案 0 :(得分:0)
在继续之前尝试检查文件路径:
$file_path = $this->filePath.'d/'.$this->compId.'/'.$data->project_id.'/'.$result[0]->file_name;
if (! file_exists($file_path)) {
die('the file path '.$file_path.' does not appear to exist');
}