I am trying to configure a PHP file as a cron job, where this PHP file contains other PHP files.
The file itself is located at /var/www/vhosts/domain.com/httpdocs/app/protected/classes/cron/runner.php
The included file is located at /var/www/vhosts/domain.com/httpdocs/app/protected/config.php
How to include this configuration file from runner.php? I tried to do require_once ('../../config.php'), but he said that the file does not exist. I guess cron is running PHP from somewhere else or something.
The cron task is as follows.
/ usr / bin / php -q / var / www / vhosts / domain.com / httpdocs / app / protected / classes / cron / runner.php
Any thoughts?
php cron
Richw
source share