Blogger Information
Blog 8
fans 0
comment 1
visits 6063
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
3间接继承控制器基类
嫩嫩小宝的博客
Original
682 people have browsed it

thinkphp5中不需要继承基类就可以工作,但是建议间接继承控制器基类Controller

我们用Base.php继承控制器基类,这样在用户自定义的控制器就不用继承Controller了,直接继承Base即可

好出:用Base作为中间层可以定义一些公共方法和系统常量

11.png22.png


Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post