function script_is_cli in Coder 7.2
Same name and namespace in other branches
- 7 coder_upgrade/scripts/coder_upgrade.run.php \script_is_cli()
Returns boolean indicating whether script is being run from the command line.
See also
1 call to script_is_cli()
- coder_upgrade.run.php in coder_upgrade/
scripts/ coder_upgrade.run.php
File
- coder_upgrade/
scripts/ coder_upgrade.run.php, line 225
Code
function script_is_cli() {
return !isset($_SERVER['SERVER_SOFTWARE']) && (php_sapi_name() == 'cli' || is_numeric($_SERVER['argc']) && $_SERVER['argc'] > 0);
}