学习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
1、制作一个检查类 D:\wamp\www\wish\APP\Admin\Controller\CommonController.class.php:
将会跳转到 http://localhost/wish/index.php/Admin/Login/index.html
相关文章推荐
- x01.TodoList:Asp.Net 5 初探
- Rich控件一
- Codeforces Round #323 (Div. 2) A. Asphalting Roads
- asp.net数据类型--泛型
- Aspects 源代码解析<一>
- Codeforces 583 DIV2 Asphalting Roads 模拟
- Codeforces Round #323 (Div. 2) 583A. Asphalting Roads
- codeforces #323 div 2 A. Asphalting Roads(暴力
- ASP.NET连接ACCESS数据库WEB.CONFIG内路径最优写法
- ASP.NET 无法向会话状态服务器发出会话状态请求请。确保 ASP.NET State Service (ASP.NET 状态服务)已启动
- cf#323-div2-A. Asphalting Roads-简单模拟
- Asp.Net MVC HTML Helper 中 LabelFor TextBoxFor的一些理解
- Asp.Net MVC 使用 DataAnnotations 进行模型验证
- Asphalting Roads
- ASP.NET,Web界面利用Button来实现将telerik:RadGrid表格内数据导出Excel
- Codeforces Round #323 A Asphalting Roads
- 树莓派raspberry Pi2 介绍
- 【Jqurey EasyUI+Asp.net】---DataGrid增加、删、更改、搜
- 在树莓派Raspberry Pi 2 Model B 上安装ROS
- 无显示屏安装raspberrypi OS