Cron Job Includes
Posted on 2012-04-06
I have the following cron setup on my server:
php -q /var/www/vhosts/inboxreach.com/httpdocs/MailPlatform/lib/crons/mailings_load.php
This cron job requires classes located in
Let's say I have class A, class B, and class C that are required in the cron script. All three class objects are created on the cron script. I then call out a method from Class A and use the global keyword to include the class B object and make a call to a Class B function. This works fine. However, when I make a call to class C and try and use global to include the class B object it fails.
I've tried including the class B file at the top of the class C file so that I can initiate a new object, but I keep getting require_once errors as I do not fully understand how to include a file if the include_path is the current directory and I need to go up a level.