ThinkPHP5路由
測試代碼:public function info($id){
echo url('index/index/info',['id'=>10])."
";
return "{$id}";}
運行結果:/web/public/index/index/info/id/10.html
已經配置了路由:'url_route_on' => true,
? ? ? ? ? ? ? ? ?'url_route_must' => false,
'posts/:id' => 'index/index/info'
但是訪問的路徑用localhost/posts/2.html就報錯,這是什么問題?
2017-07-28
posts/:id=>'/web/public/index/index/info'