Search found 2 matches

by Ayashi
Wed Jan 30, 2008 4:58 am
Forum: PHP - Code
Topic: PHP script called by cron
Replies: 3
Views: 166

Re: PHP script called by cron

Found a trick :

Code: Select all

$FileName = $_SERVER["PATH_TRANSLATED"];
$Values   = split("/",$FileName);
for ($i=0;$i<=count($Values)-2;$i++)
 $Path = $Path.$Values[$i]."/";
by Ayashi
Wed Jan 30, 2008 4:21 am
Forum: PHP - Code
Topic: PHP script called by cron
Replies: 3
Views: 166

PHP script called by cron

hi all, I'm trying to figure out the base path of a script called by a cron job : Zharma scripts # crontab -l * * * * * /usr/bin/php /home/webroot/scripts/crontab.php >> /home/webroot/scripts/crontab.log Looking in $_SERVER["PWD"] give me a wrong value. ( /root ) is there a way to figure o...