Home >Backend Development >PHP Tutorial >ThinkPHP's method of letting ../Public in the template without parsing (outputting it directly) Original, thinkphpfont_PHP tutorial

ThinkPHP's method of letting ../Public in the template without parsing (outputting it directly) Original, thinkphpfont_PHP tutorial

WBOY
WBOYOriginal
2016-07-12 09:08:03972browse

ThinkPHP’s method of preventing ../Public from being parsed (directly output) in the template is original. thinkphpfont

This article describes an example of ThinkPHP’s method of preventing ../Public from being parsed in the template. . Share it with everyone for your reference. The details are as follows:

Question:

The template contains ../Public and needs to be output directly, but ../Public will be directly replaced by the current public template directory, and the final output is: /Project Directory/Tpl/default/Public/

Solution:

Add template constant settings in the configuration file config.php:

'TMPL_PARSE_STRING' => array(
 '../Public' =>"../Public",
) // 模板引擎要自动替换的字符串,必须是数组形式。

Here you can set ../Public to output as is.

I hope this article will be helpful to everyone’s ThinkPHP programming design.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/1058138.htmlTechArticleThinkPHP allows.../Public to use the original method of not parsing (directly outputting) the template, thinkphpfont This article describes ThinkPHP with examples A way to make ../Public not parse in templates. Share it with everyone for your reference...
Statement:
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