I typically look for $ENV{'SERVER_NAME'} or other items that are set automatically by the webserver, with the assumption that most people's shell won't have it set. Another good one to check might be $ENV{'GATEWAY_INTERFACE'}.
In reply to Re^2: Telling if your script is running from web page or CLI
by jhourcle
in thread Telling if your script is running from web page or CLI
by dizzyg
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |