From 54102f0cbb3d379aee07d70d02b26fc182d368f2 Mon Sep 17 00:00:00 2001 From: lihq1403 Date: Thu, 14 Jul 2022 17:44:12 +0800 Subject: [PATCH] feat: support micro sapi mode --- src/AbstractApplication.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/AbstractApplication.php b/src/AbstractApplication.php index 95d5b90..afe6c41 100644 --- a/src/AbstractApplication.php +++ b/src/AbstractApplication.php @@ -431,7 +431,7 @@ public function copy(): self protected function runtimeCheck(): void { // check env - if (!in_array(PHP_SAPI, ['cli', 'phpdbg', 'cli-server'], true)) { + if (!in_array(PHP_SAPI, ['cli', 'phpdbg', 'cli-server', 'micro'], true)) { header('HTTP/1.1 403 Forbidden'); exit(" 403 Forbidden \n\n" . " current environment is CLI. \n" . " :( Sorry! Run this script is only allowed in the terminal environment!\n,You are not allowed to access this file.\n"); }