"/> ">

Home >Backend Development >PHP Tutorial >saving private ryan php Smarty first experience 2 Get configuration information

saving private ryan php Smarty first experience 2 Get configuration information

WBOY
WBOYOriginal
2016-07-29 08:46:27973browse

Let’s look at the results first——

 php Smarty初体验二 获取配置信息

The page source code is as follows:

 php Smarty初体验二 获取配置信息

Analyze the code and check that the index_config.php (Smarty connection file) and index.php files are correct. Let’s focus on the template file. The possible reason lies in this tpl file, output the code——

Copy the code The code is as follows:


{% config_load file="1.conf" section="style2" %}


 Page source code

 php Smarty初体验二 获取配置信息

  Summary, when using Smarty When creating templates, do not add spaces for the sake of code beauty and readability. In this way, Smarty will not parse these as variables, but will output them directly

The above introduces the first experience of saving private ryan php Smarty 2 to obtain configuration information, including the content of saving private ryan. I hope it will be helpful to friends who are interested in PHP tutorials.

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