通过url 连接将参数传递到控制器,ThinkPHP默认开启了pathinfo 模式,
url链接为 http://localhost:32586/index.php/Home/Blog/showblog/id/201601 网页如下
解决方法:
1、在配置文件中修改默认为普通模式 :'URL_MODEL' =>'0',
2、或改写链接为 http://localhost:32586/index.php/Home/Blog/showblog?id=201601
通过url 连接将参数传递到控制器,ThinkPHP默认开启了pathinfo 模式,
url链接为 http://localhost:32586/index.php/Home/Blog/showblog/id/201601 网页如下
解决方法:
1、在配置文件中修改默认为普通模式 :'URL_MODEL' =>'0',
2、或改写链接为 http://localhost:32586/index.php/Home/Blog/showblog?id=201601