ITPub博客

首页 > > > thinkphp路由映射

thinkphp路由映射

作者:fondtiger 时间:2019-10-30 12:54:38 0 删除 编辑

lassIndexextendsController{ public function name() { $this->assign("name",'姓名');returnview(); }}

根据官网给的例子访问上面的action的url是

http://host/tp5/public/index.php/index/index/name

/模块/控制器/名称

可以我访问的时候一直是404,必须按以下方式进行访问才可以

http://host/tp5/public/index.php?s=index/index/name

这样的url实在是太难看了。请问这个我还需要设置,才可以同官网的一样呢?

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/2508/viewspace-3150371/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2019-09-29

  • 博文量
    122
  • 访问量
    13449