0

I had just implemented the import file for pset8 and was trying to run it and the following result was obtained.

./import ../US.txt
PHP Fatal error:  Class 'CS50' not found in
/home/ubuntu/workspace/pset8/bin/import on line 57
PHP Stack trace:
PHP   1. {main}() /home/ubuntu/workspace/pset8/bin/import:0

Fatal error: Class 'CS50' not found in /home/ubuntu/workspace/pset8/bin/import on line 57

Call Stack:
0.0002     244624   1. {main}() /home/ubuntu/workspace/pset8/bin/import:0

I had used the query function as

$result =CS50::query("INSERT INTO places .....");

As far as I can see it can't find the class CS50. What my be the problem and possible fixes? Does anyone else facing the same problem.

1 Answer 1

0

Have you told your program where to find the CS50 library with the appropriate "require" statement(s)?

1
  • Got it because functions.php was removed and I was importing it. Now it's working fine. Just need to add helpers.php. Commented Apr 10, 2016 at 9:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .