I am trying to install PHP PhantomJS package in a blank project, but I am getting this error:
Fatal error: Class 'JonnyW\PhantomJs\Client' not found
This is my composer.json:
And this is my index.php:
Can anyone tell why is the class not found? I suspect something is wrong in composer.json but I cannot figure out what.
The file is not found, because the index.php
misses to include the Composer Autoloader.
Please add the following line at the top:
require __DIR__ . '/../vendor/autoload.php';
(I wonder why you are working directly inside the JonnyW/PhantomJS
project folder and not inside your own project? Anyway...)