namespace think;
if (false !== strpos(PHP_SAPI,'cli')) {
$_SERVER['REQUEST_URI'] = $_SERVER['argv'][1] ?? '';
}
require __DIR__ . '/../vendor/autoload.php';
//执行HTTP应用并啊应
$http = (new App())->http;
$response = $http->run();
$response->send();
$http->end($response);
在public目录下执行命令 php cli.php index/test
输出成功