joanhey / AdapterMan

Run almost any PHP app faster and asynchronously with Workerman, without touch 1 line of code in your fw or app. Also use it as Serverless.
https://twitter.com/adaptermanphp
MIT License
759 stars 50 forks source link

How to run it in thinkphp6 , I try but not success #77

Open yemaozi999 opened 7 months ago

yemaozi999 commented 7 months ago

this is my start.php ` namespace think;

require DIR . '/vendor/autoload.php'; require_once './public/slog.php'; // 定义CMF根目录,可更改此目录 define('CMF_ROOT', DIR . '/'); // 定义应用目录 define('APP_PATH', DIR . '/app/'); define('CONF_PATH', CMF_ROOT . '/config/'); //define('QJ_ADMIN_COMM', APP_PATH . '/admin/common/'); define('WEB_ROOT', DIR . '/'); define('VENDOR_PATH',DIR . '/vendor/'); define('PHINX_PATH', realpath(DIR . '/phinx-migrations-generator/bin/'));

require APP_PATH . '/Const.php';//常量表 class newApp extends App{ public function getConfigPath():string{ if(defined(CONF_PATH)){ return CONF_PATH; }else{ return $this->rootPath . 'config' . DIRECTORY_SEPARATOR; } } }

// 执行HTTP应用并响应 $http = (new newApp())->http; $response = $http->run(); $response->send(); $http->end($response); `