例如一个企业官网,有几个controller:index、about、contact
每一个都需要前置检查一下登录,所以有个 controller\first.php
<?php
//controller\First.php
class First extends Controller{
function _initialize(){
//检查登录的代码
}
}
然后其它controller一一继承<?php
//controller\About.php
class About extends First{
function index(){
}
}
从我学习使用 TP5.1起,发现这样不行了,不知现在要怎样搞求解决办法,在线等
最佳答案
