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

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

Ich bin nicht in der Lage, die Antwort der PDF-Datei mit dem obigen Code zu erhalten.Imagick-Funktion zum Lesen von PDF-Dateien

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...')

Antwort

0

Versuchen Sie den Dateipfad, bevor Sie fortfahren Überprüfung:

$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

es nicht funktioniert, können Sie bitte irgendeine andere Lösung für sie vorschlagen! –

+0

stirbt es und sagt Ihnen, dass der Dateipfad nicht existiert? – WEBjuju