LMSouq
server-admin Open

PHP - how to best determine if the current invocation is from CLI or web server?

SH
Shameem
1 month ago
3 views
Problem Description
I need to determine whether the current invocation of PHP is from the command line (CLI) or from the web server (in my case, Apache with mod_php). Any recommended methods?

AI-Generated Solution

Powered by LMSouq AI · GPT-4.1-mini

✓ Solution Ready
Analyzing problem and generating solution…
Was this solution helpful?
Back to Knowledge Base