Home > Backend Development > PHP Tutorial > The template function in phplib is indeed very easy to use, but there is a fatal mistake that needs to be corrected_PHP Tutorial

The template function in phplib is indeed very easy to use, but there is a fatal mistake that needs to be corrected_PHP Tutorial

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-07-20 11:03:36
Original
1034 people have browsed it

template.inc included in phplib contains a template class, which can be used to separate program code and
interface, which brings great convenience to program design and interface design, and its implementation is faster than
template Be good. But there is a fatal little error that causes the set_block() function to not work properly, and this
function is very important. It is very useful when dealing with repeated blocks.
The following uses the simplest example to explain the usage and solution:
Template file: page1.ihtml (you can choose the name casually, the suffix ihtml is a common usage)


{TITLE}



ID: {ID}

NAME: {NAME}



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