thinkphp 访问静态页面

来源:互联网 发布:京东二手优品 知乎 编辑:程序博客网 时间:2024/05/01 14:10

控制器

thinkphp实现了MVC架构,控制器Controller层实现业务逻辑,模型Model层实现与数据库的交互,视图View层实现页面。

thinkphp的页面地址为:http://localhost/demo/index.php?m=Index&a=index

thinkphp 访问静态页面时,相应的控制器没有对应的方法时,会去搜索view目录下的静态html文件。

例如:view下有test文件夹,有test1.html,test2.html。当控制器Test下没有方法test1时,thinkphp会直接访问相应的静态页面,即http://localhost/demo/index.php?m=Test&a=test1访问的是test1.html而非test1的方法。

0 0