您的位置:首页 > 编程语言 > ASP

学习ThinkPHP3.2.2:video13,功能的继承,类似ASP的include

2015-10-05 10:10 483 查看
后台功能页面中,每个页面都需要验证是否已经合法登录。我们可以先制作一个检查的类,然后其他的类直接扩展(extends)这个检查类即可。

1、制作一个检查类 D:\wamp\www\wish\APP\Admin\Controller\CommonController.class.php:

2、继承CommonController类的功能 D:\wamp\www\wish\APP\Admin\Controller\IndexController.class.php

3、检验一下,在未登录状态下,浏览 http://localhost/wish/index.php/Admin/Index/index
将会跳转到 http://localhost/wish/index.php/Admin/Login/index.html
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: