In php, how to detect the execution is from CLI mode or through browser ?
Posted
by binoy
on Stack Overflow
See other posts from Stack Overflow
or by binoy
Published on 2010-01-02T11:33:02Z
Indexed on
2010/04/04
10:43 UTC
Read the original article
Hit count: 296
php
Hi,
I have a common script which Im including in my php cron files and the files which are accessing through the browser. Some part of the code, I need only for non cron files. How can I detect whether the execution is from CLI or through browser (I know it can be done by passing some arguments with the cron files but I dont have access to crontab). Is there any other way ?
Regards Binoy
© Stack Overflow or respective owner