Answer the question
In order to leave comments, you need to log in
Cron can't find class from included file?
At first I tried to include the file with the class like this:
require_once $_SERVER['DOCUMENT_ROOT'].'/components/DataBase.php';
cron didn't find the file,
then changed it like this:
require_once ' site.ru/components/addbets.php ';
now the file is found, but the class from the file is not found.
Writes the following:
Fatal error: Class 'DataBase' not found in /home/d/diman3q1/site.ru/public_html/components/addname.php on line 13
Answer the question
In order to leave comments, you need to log in
Logically, there is no document_root in php launched from the console
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question