config_load function

config_load function

Usage:

The configuration file may contain multiple parts. At this time, you can use the additional attribute section to specify which part to get the variable from.

Note: The section in the configuration file and the template built-in function section are just named the same and have nothing to do with each other.

#eg:

test.html:

{config_load file="colors.conf" section="Customer"}  {#pageTitle#}  
First Last Address

colors.conf:

#注释 #段落变量 [Customer] pageTitle='顾客表' bodyBgColor='#00f' tableBorderSize='1' tableBgColor='skyblue' rowBgColor='red' tableBgColor='skyblue' [Person] pageTitle='所有人表' bodyBgColor='#eee' tableBorderSize='1' tableBgColor='skyblue' rowBgColor='red' tableBgColor='skyblue' [other] other='这是其他'

Run results:

微信图片_20180313092919.png


##section When =="Person", the running result is:

微信图片_20180313093218.png


#

Continuing Learning
||
submit Reset Code
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!