url路由参数解析问题

浏览:416 发布日期:2018/06/25
5.0.0 - 普通 - 未处理
对于'url_common_param' => false,情况,当传递的参数以"/"、"?"等符号结尾,或者传递的参数有个别中文字符(如包含"全"字)时,使用 Url::build生成的地址访问时会报错.
比如用 Url::build('test', ['name' => '/']);生成的地址(http://localhost/demo/public/index/index/test/name/%2F.html)访问时会报"The requested URL /demo/public/index/index/test/name//.html was not found on this server."
又如用Url::build('test', ['name' => '全']);生成的地址(http://localhost/demo/public/index/index/test/name/%E5%85%A8.html)会报The requested URL /demo/public/index/index/test/name/å…¨.html was not found on this server.
即时对“全”字做了转码处理也是会报错,请问如何破,除了将'url_common_param'改成true
评论()
后面还有条评论,点击查看>>