Saturday, January 24, 2009

a simple way to get your PHP script if running in CLI

There is a function to get that way easier.

public static function inCli() {
return php_sapi_name() == ‘cli’;
}

No comments:

Post a Comment