$_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

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

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

openssl - Load PKCS#8 binary key into Ruby -