Detect php cli execution
Posted: Thu Mar 22, 2007 6:41 pm
I have a web-based script than I can manually update.
For the web interface you must login.
But I want the same script run as a scheduled cli script.
To defeat the login procedure it must reliable detect that the script is executed from the cli.
Is there a reliable way to detect if the script is executed from the cli?
For the web interface you must login.
But I want the same script run as a scheduled cli script.
To defeat the login procedure it must reliable detect that the script is executed from the cli.
Is there a reliable way to detect if the script is executed from the cli?