模块访问的调用文件
IndexAction.class.php
表示相关模块
class IndexAction extends Action{
表示相关方法
public function index(){
header(“Content-Type:text/html; charset=utf-8”);
echo “第一个例子测试!”;
}
}
访问的url
1.传统模式 newApp.php?m=index&a=checkEnv
2.普通模式 newApp.php/index/checkEnv
调用的模板
**
| 参数 | 例子一 | 例子二 |
|---|---|---|
| URL地址 | http://127.0.0.1/index.php/Index/index | http://127.0.0.1/index.php/User/read |
| 文件名(控制器) | IndexAction.class.php | UserAction.class.php |
| 类名 | IndexAction | UserAction |
| 模块名 | Index | User |
| 操作名 | index | read |
| 对应模板 | Tpl\default\Index\index.html | Tpl\default\User\read.html |
