Closed yangguangwuwu closed 1 year ago
https://github.com/joanhey/AdapterMan/blob/master/src/frameworks/think.php
if (is_dir($routePath)) { $files = glob($routePath . '*.php'); foreach ($files as $file) { // Change include to include_once include_once $file; } }
Change include to include_once
think\Http line 222 /** * 加载全局中间件 */ protected function loadMiddleware(): void { if (is_file($this->app->getBasePath() . 'middleware.php')) { $this->app->middleware->import(include $this->app->getBasePath() . 'middleware.php'); } }
include $this->app->getBasePath() . 'middleware.php' include_once $this->app->getBasePath() . 'middleware.php'
@walkor
I don't know ThinkPHP, so I can't help you here. Sorry.
@yangguangwuwu If you find a problem, welcome to send pr to improve it.
https://github.com/joanhey/AdapterMan/blob/master/src/frameworks/think.php
Change include to include_once
Change include to include_once