You are here

function script_is_cli in Coder 7

Same name and namespace in other branches
  1. 7.2 coder_upgrade/scripts/coder_upgrade.run.php \script_is_cli()

Returns boolean indicating whether script is being run from the command line.

See also

drupal_is_cli()

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);
}