PHP script called by cron
Posted: Wed Jan 30, 2008 4:21 am
hi all,
I'm trying to figure out the base path of a script called by a cron job :
Looking in $_SERVER["PWD"] give me a wrong value. ( /root )
is there a way to figure out the real folder ( /home/webroot/scripts/ )
Kind regards,
Aya.
I'm trying to figure out the base path of a script called by a cron job :
Code: Select all
Zharma scripts # crontab -l
* * * * * /usr/bin/php /home/webroot/scripts/crontab.php >> /home/webroot/scripts/crontab.logis there a way to figure out the real folder ( /home/webroot/scripts/ )
Kind regards,
Aya.