thinkphp一个挺奇怪的事

WBOY
Release: 2016-06-23 13:34:03
Original
859 people have browsed it

大家知道thinkphp中用了layout布局的方法。使用时必须要开启它。即'LAYOUT_ON'=>ON;
但是这个文件最初是在parseTemplateBEhavior.class.php中定义的。
这点我感觉奇怪,为啥他不在普通的 config.class.php中定义呢,为啥要跑这么远,在一个行为文件中定义呢?
难道说thinkphp的发明人认为这个layout是属于切面编程吗,就是属于怎么也看不出切面编程的痕迹呢?
还有,这个layout在代码追踪上是如何绕了很多圈而系统识别呢。


回复讨论(解决方案)

追踪代码?我只用xdebug

追踪代码?我只用xdebug


你用的是什么IDE
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!