Adding modifications from kritbit
This commit is contained in:
17
system/vendor/is_cli.php
vendored
Normal file
17
system/vendor/is_cli.php
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
|
||||
function is_cli()
|
||||
{
|
||||
if( defined('STDIN') )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
if( empty($_SERVER['REMOTE_ADDR']) and !isset($_SERVER['HTTP_USER_AGENT']) and count($_SERVER['argv']) > 0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
Reference in New Issue
Block a user