I have the following file structure:
cron.php /includes/functions.php /classes/ClassName.php
corn.php includes functions.php calls new ClassName(). And functions.php contains the primitive autoloader:
function __autoload($class_name) {
require_once('classes/'.$class_name.'.php');
}
which works fine when cron.php is called from browser. However if run from shell it is giving "No such file or directory" fatal error. I tried to wrap 'classes/'.$class_name.'.php' into realpath() function to no avail. Please advise.