Home > Backend Development > PHP Tutorial > 怎么组装一个模版

怎么组装一个模版

WBOY
Release: 2016-06-13 12:40:47
Original
920 people have browsed it

如何组装一个模版?
写了许多function和class,分别保存在若干个php文件里。
如a.php

function my_trim($text){
  return strip_tags(trim($text));
}

现在有一个index.php页面,如何加载这些function和class,用include,requre_once,require,哪种耗资源最少,效率最高?

另外,如果网站支持多语言,在index.php里如何加载语言文件,语言文件的保存格式是什么?也是include,requre_once,require?如何替换function和class里的翻译文字?

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