トップに戻る
tags
if (strpos(php_sapi_name(), 'cli') !== false) { // Run from command }
if (strpos(php_sapi_name(), 'cli') === false) { // Run from web }
引用 : http://bit.ly/2Ji9Efi
edit