官方demo 复制过来的,访问:http://127.0.0.1:8787/test/
未如期返回 test
不知道是什么原因?
<?php
/**
* This file is part of webman.
*
* Licensed under The MIT License
* For full copyright and license information, please see the MIT-LICENSE.txt
* Redistributions of files must retain the above copyright notice.
*
* @author walkor<walkor@workerman.net>
* @copyright walkor<walkor@workerman.net>
* @link http://www.workerman.net/
* @license http://www.opensource.org/licenses/mit-license.php MIT License
*/
use Webman\Route;
Route::any('/test', function ($request) {
return response('test');
});
404
linux
人不行
已解决 不要以守护模式启动
Route::group('/collect', function () use ($TOOL_MID) {
Route::group('/collect', function () {
Route::any('/addCollectForm', [\App\toolManage\controller\collect\CollectController::class, 'addCollectForm']);//提交表单
})->middleware($TOOL_MID);
})->middleware($TOOL_MID);
直接用any格式设置好用点
/test/
/test
这是两个不同的url。