mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-22 14:23:57 -07:00
refactor: Changed some php_sapi_name()
to PHP_SAPI
constants
This commit is contained in:
parent
84c6ca17b1
commit
46a03a8b86
3 changed files with 3 additions and 3 deletions
|
@ -13,7 +13,7 @@ if (!defined('BB_ROOT')) {
|
|||
}
|
||||
|
||||
// Check CLI mode
|
||||
if (php_sapi_name() !== 'cli') {
|
||||
if (PHP_SAPI != 'cli') {
|
||||
exit;
|
||||
}
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ define('BB_ROOT', __DIR__ . DIRECTORY_SEPARATOR);
|
|||
define('BB_PATH', BB_ROOT);
|
||||
|
||||
// Check CLI mode
|
||||
if (php_sapi_name() !== 'cli') {
|
||||
if (PHP_SAPI != 'cli') {
|
||||
die('Please run <code style="background:#222;color:#00e01f;padding:2px 6px;border-radius:3px;">php ' . basename(__FILE__) . '</code> in CLI mode');
|
||||
}
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ define('BB_ROOT', __DIR__ . DIRECTORY_SEPARATOR);
|
|||
define('BB_PATH', BB_ROOT);
|
||||
|
||||
// Check CLI mode
|
||||
if (php_sapi_name() !== 'cli') {
|
||||
if (PHP_SAPI != 'cli') {
|
||||
die('Please run <code style="background:#222;color:#00e01f;padding:2px 6px;border-radius:3px;">php ' . basename(__FILE__) . '</code> in CLI mode');
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue