初学,为什么我在app\index\controller、index.php里加上
public function test()
{
return '<h1>hello niunan...</h1>';
}
然后运行 http://localhost:10003/public/index.php/index/test
运行
http://localhost:10003/public/index.php/index/index是正常显示的
http://localhost:10003/public/index.php/index/index/test
真实访问是这个。。。我操你妈的THINKPHP。。。。日。。。
application目录下的index目录是模块名
index目录下的controller目录下的index.php 是控制器,名称是index,
index.php里二个方法,一个名字叫index,一个名字叫test
访问的时候是