Posted by roger.moon2 on 04/25/07 21:03
So I wrote a script and at the top it checks whether a file exists
like below
if (!file_exists("settings.ini"))
return false;
and the crontab entry:
00 08 * * 4 /usr/local/bin/php /home/user/scripts/test.php > /dev/null
2>&1
however everytime it runs via cron, it can't find the file
settings.ini because it keeps looking for it in $HOME not in $HOME/
scripts/ where test.php resides
Why? And how can I re-code it to look in the current directory not in
$HOME? I tried ./settings.ini but without success
[Back to original message]
|