This commit is contained in:
xiaomlove
2022-04-06 21:32:57 +08:00
parent 03009c846e
commit 6ac7194d43
21 changed files with 659 additions and 66 deletions
+7 -4
View File
@@ -9,9 +9,12 @@ defined('VERSION') || define("VERSION","Powered by <a href=\"aboutnexus.php\">".
defined('THISTRACKER') || define("THISTRACKER","General");
defined('ROOT_PATH') || define('ROOT_PATH', dirname(__DIR__) . '/');
if (!defined('RUNNING_IN_OCTANE')) {
if (!empty($_SERVER['PWD']) && str_contains($_SERVER['PWD'], 'vendor/laravel/octane/bin')) {
define('RUNNING_IN_OCTANE', true);
} else {
define('RUNNING_IN_OCTANE', false);
$runningInOctane = false;
foreach (($_SERVER['argv'] ?? []) as $command) {
if (preg_match('/swoole|roadrunner/i', $command)) {
$runningInOctane = true;
break;
}
}
define('RUNNING_IN_OCTANE', $runningInOctane);
}