看手冊的時候發現的,可以避免一些衝突,手冊還是要仔細看才好。
在這個application/route.php下面可以加入任何你想要設定的路由,真的很方便。我把驗證碼的路由也放到這個裡面了。 return [<br>
'__pattern__' => [<br>
'name' => 'w+',<br>
],<br>
'[hello]' => [<br>
':id' => ['index/hello', ['method' => 'get'], ['id' => 'd+']],<br>'], ['id' => 'd+']]
':name' => ['index/hello', ['method' => 'post']],<br>
],<br>
'captcha/[:id]' => ['thinkcaptchaCaptchaController@index',['method'=>'get'], ['id' => 'd+'],
// 'captcha/[:id]' => 'thinkcaptchaCaptchaController@index', /*驗證碼路由*/<br>
'zxzx/index' => 'zxzx/zxzx/index',<br>
'admin/admin' => 'zxzx/admin/admin',<br>
'zxzx/add' => 'zxzx/zxzx/add',<br>
'zxzx/edit' => 'zxzx/zxzx/edit',<br>
'zxzx/del' => 'zxzx/zxzx/del',<br>
'admin/profile' => 'zxzx/admin/profile',<br>
'admin/logout' => 'zxzx/admin/logout',<br>
'user/login' => 'zxzx/user/login',<br>
'user/login_captcha' => 'zxzx/user/login_captcha',<br>
'user/index' => 'index/user/index',<br>
'user/create' => 'index/user/create',<br>
'user/add' => 'index/user/add',<br>
'user/add_list' => 'index/user/addList', <br>
'user/update/:id' => 'index/user/update',<br>
'user/delete/:id' => 'index/user/delete',<br>
'user/:id' => 'index/user/read',<br>
];<br>