function _seckit_drupal_is_cli in Security Kit 6
Helper function to determine if Drupal is running in command line mode.
This is a backport of Drupal 7's drupal_is_cli() function.
1 call to _seckit_drupal_is_cli()
- _seckit_origin in ./
seckit.module - Aborts HTTP request upon invalid 'Origin' HTTP request header.
File
- ./
seckit.module, line 621 - Allows administrators to improve security of the website.
Code
function _seckit_drupal_is_cli() {
return !isset($_SERVER['SERVER_SOFTWARE']) && (php_sapi_name() == 'cli' || is_numeric($_SERVER['argc']) && $_SERVER['argc'] > 0);
}