Swader / diffbot-php-client

[Deprecated - Maintenance mode - use APIs directly please!] The official Diffbot client library
MIT License
53 stars 20 forks source link

PHP Fatal error #24

Closed steved1982 closed 8 years ago

steved1982 commented 8 years ago

I have installed diffbot using composer and it created the autoload files as normal.

My code is simply:

require_once "../../vendor/autoload.php"; $diffbot = new Diffbot('KEY');

BUT I get the error: PHP Fatal error: Class 'Diffbot' not found

I am running PHP Version 5.6.12

Swader commented 8 years ago

Use the fully qualified class name:

$diffbot = new Swader\Diffbot\Diffbot('KEY');

or import it at the top and then use the short form:

use Swader\Diffbot\Diffbot;

$diffbot = new Diffbot('KEY');
steved1982 commented 8 years ago

Thank you!