2016-11-03 7 views
0
$file_path = $this->filePath.'d/'.$this->compId.'/'.$data->project_id.'/'.$result[0]->file_name; 

$im = new Imagick();  
$im->pingImage($file_path); 

上記のコードを使用してPDFファイルの応答を取得できません。imagick関数を使用してPDFファイルを読み取る

Error:-Fatal error: Uncaught exception 'ImagickException' with message 'Failed to read the file' in /srv/www/api.proofhub.com/public_html/application/core/v2/proof.php:114

Stack trace: #0 /srv/www/api.proofhub.com/public_html/application/core/v2/proof.php(114): Imagick->pingimage('/srv/www/api.pr...')

答えて

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'); 
} 
+0

それは働いていない、あなたはそれのために他のソリューションを提案してくださいすることができます! –

+0

それは死んで、file_pathが存在しないと伝えますか? – WEBjuju

関連する問題