$_SERVER['DOCUMENT_ROOT'] does not work in the php script running through cron -


i use $_server['document_root']."/lib/sft_required.php"; include 'sft_required' file in php script. when run file using browser, works fine when run cron job job, not work. seems file not included when run script through cron.

assuming running script directly through cron (as opposed web server accessed http request triggered cronjob (e.g. cron running wget)), of course doesn't work.

there no server, $_server not set.


Comments

Popular posts from this blog

ruby - When to use an ORM (Sequel, Datamapper, AR, etc.) vs. pure SQL for querying -

php - PHPDoc: @return void necessary? -

c++ - Convert big endian to little endian when reading from a binary file -