上面的这地址是TP5默认的访问地址,访问的是Controller/index.php里面的index方法
http://localhost/public/user/index/
目前我想达成这种需求,user是Controller/user.php,index是user.php的方法,index.php已经按照手册隐藏起来了,但是这个地址的路由应该怎么配呢,包括user/follow、user/test等等,或其他act/index、act/follow、act/test等等
目前的route.php配置参数如下
'testurl' => 'User/testurl',
'followers' => 'User/followers',
'userIndex' => 'User/index',
感觉如果每个都去route.php里这样写,有些费力,目的只是想去掉项目(index)的那层目录,有无好方法呢? 最佳答案
