Question : is cli php
Answered by : indonesia-people
if (php_sapi_name() == "cli") { // In cli-mode
} else { // Not in cli-mode
}
Source : https://stackoverflow.com/questions/1991346/in-php-how-to-detect-the-execution-is-from-cli-mode-or-through-browser | Last Update : Sat, 24 Dec 22