Closed jayanpatel closed 7 years ago
Hello!
I have no prior knowledge of PHP and I was handed down a project made entirely out of PHP.
My issue is that whenever I try to run my project, I receive the following error:
Fatal error: Class 'Curl\Curl' not found in /Users/jayanpatel/Desktop/Clickstream-Generator/mainstream//rrapi.php on line 74
This what it looks like in line 74:
$curl = new Curl\Curl();
And this is what I have in the composer.json:
Can you please help a beginner in PHP understand what is going on and how to solve this issue?
Thanks! J.
Hi jayanpatel,
You should use require_once to include the composer autoloader in your project root file or in each file:
<?php require_once '/path/to/vendor/autoload.php';
For more help:
Hello!
I have no prior knowledge of PHP and I was handed down a project made entirely out of PHP.
My issue is that whenever I try to run my project, I receive the following error:
Fatal error: Class 'Curl\Curl' not found in /Users/jayanpatel/Desktop/Clickstream-Generator/mainstream//rrapi.php on line 74
This what it looks like in line 74:
$curl = new Curl\Curl();
And this is what I have in the composer.json:
Can you please help a beginner in PHP understand what is going on and how to solve this issue?
Thanks! J.