$_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++ - Convert big endian to little endian when reading from a binary file -

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

unicode - Are email addresses allowed to contain non-alphanumeric characters? -