Methods to determine if PHP is running from a shell or within apache?



Possible Duplicate:
How to differentiate between http and cli requests?
Which method to detect run mode of php script is more reliable?

What’s the best method to determine if php is running from a shell (cron or otherwise) or running under apache?


you might find this useful:

Answered By – marcelog

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave A Reply

Your email address will not be published.

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More