haplousframework/system/vendor/is_cli.php

17 lines
221 B
PHP
Raw Normal View History

2016-04-15 03:01:11 +00:00
<?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;
}