【发布时间】:2013-07-01 23:23:30
【问题描述】:
这被认为是不好的编程习惯吗?为了制作模板,我在文件的开头和结尾包含了内容。 所以是这样的
beginning.php
<html>
some stuff
end.php
some stuff
</html>
user accessed files
include beginning.php
some stuff
include end.php
【问题讨论】:
-
它本身还不错,但从长远来看,使用像 MVC 这样的设计模式会更好、更具可扩展性和可维护性。