- Module
- Controller
- Action
http://domain.com/moduleName/controllerName/actionName
其中 module name 默认为 default. 在一般情况下,不用写出来。
具体访问路径是:
URI Module / Controller / Action Called
http://127.0.0.1:8080/ Default / IndexController / indexAction
http://127.0.0.1:8080/index Default / IndexController / indexAction
http://127.0.0.1:8080/index/index Default / IndexController / indexAction
http://127.0.0.1:8080/index/about Default / IndexController / aboutAction
如果一个action里面有多的参数,他的路径也可以有附加参数:
http://127.0.0.1:8080/index/about/name/keith
http://127.0.0.1:8080/index/about/name/keith?age=26&country=England
例如:当indexAction是这样时:

当我们输入 http://127.0.0.1:8080/index/about/name/keith

其中,方法 _getParam包含两个参数
- 要打回的参数名称
- 此参数的默认值
0 评论:
Post a Comment