Manually develop a PHP template engine (35) and a php template. Manual development of the PHP template engine (35), the php template is called TPL, imitating the smarty template engine. The te
Manual development of PHP template engine 1 (35), php Template
The template is called TPL, which imitates the smarty template engine.
The template we call is a Web template. It is a pag
TWIG template design Quick Start Manual (Chinese. I wrote several articles about twig .. I haven't written a quick start or something. Now, the template for writing the summary twig is a common text file without a special extension. I wrote several articles about twig .. I haven't written a quick start or something. Write Now
SummaryThe twig
by {#... #} is commented out, which can be a single row or multiple rows.
Load other templatesFor details, see The include tag (translated in my blog). The rendered content is returned to the current template.{% Include 'sidebar.html '%}{% Include 'sidebar.html '%} the variables in the current template will also be passed to the include template, where you can d
: This article mainly introduces the manual development of PHP template engine 1 (35). If you are interested in the PHP Tutorial, please refer to it. The template is called TPL, which imitates the smarty template engine.
The template we call is a Web
can only have a parent template, but there is a workaround to the method to achieve the reuse of multiple templates to the purpose, see the Manual of the use of the label
HTML escapeMainly to help escape the {{User.username|e}}{{user.username|e (' JS ')}}{% Autoescape true%}Everything'll be automatically escaped in this block{% Endautoescape%}{{User.username|e}}{{user.username|e (' JS ')}}
{% Autoescape t
archive pages for the specified dayIs_time (): Whether to archive pages for a specified timeIs_archive (): Whether it is an archive pageIs_search (): Whether it is a search results pageIs_404 (): Is an "HTTP 404:not Found" error pageIs_paged (): Home/category/archive page is displayed in multiple pagesPHP functions commonly used in the header sectionPHP functions and commands commonly used in templatesOther functions related to templatesOf course, these are the most basic things related to the
Use a self-developed template engine: include (SITE_PATH.bGyT.php); $ tnewGyT (); $ t-setGyiCharset (UTF-8); $ t-setFrontSeparator ({@#); $ t-setBackSeparator (#@}); set the displayed file name $ t-setInVtrParameter (a1, guoyong I am 1); $ t-setInVtrParameter (a2, g
How to Use the manual template engine: include (SITE_PATH. /B/GyT. php); $ t = new GyT (); $ t-set
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.