Running IMagick from subfolders
Posted: 2016-03-02T23:16:18-07:00
Running getNumberImages() to get a page count of a pdf file, and it works fine when I run it from the root of my website.
I need to run it from a different directory, if I move the file to the new location, I get the "Fatal error: Class 'Imagick' not found in ..." error.
I feel like this is an easy fix, but I just can't wrap my brain around it.
The code that works is... (This throws the page count to the screen.)
I would like to run the script from inside the http://websitename.com/pdf_upload folder
Any ideas?
I need to run it from a different directory, if I move the file to the new location, I get the "Fatal error: Class 'Imagick' not found in ..." error.
I feel like this is an easy fix, but I just can't wrap my brain around it.
The code that works is... (This throws the page count to the screen.)
Code: Select all
$document = new Imagick('http://website.com/pdf_upload/CCE02112016_0004.pdf');
$Count = ($document->getNumberImages());
echo $Count;
Any ideas?