How to check with PHP if the script is being run from the console or browser request?

后端 未结 6 1525
孤街浪徒
孤街浪徒 2021-02-02 05:58

I tried things like $_ENV[\'CLIENTNAME\'] == \'Console\' but that seems to work on only certain OS\'s (worked in windows, not linux).

I tried !empty($_ENV[\'SHELL\']) b

6条回答
提交回复
热议问题