亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

config_load函數(shù)

config_load函數(shù)

使用方式:

設(shè)定檔有可能包含多個(gè)部分,此時(shí)可以使用附加屬性section 指定從哪一部分取得變數(shù).

注意:設(shè)定檔中的section 和模板內(nèi)建函數(shù)section 只是命名相同,毫不相干。

eg:

test.html:

{config_load file="colors.conf" section="Customer"}
<html>
<title>{#pageTitle#}</title>
<body bgcolor="{#bodyBgColor#}">
<table border="{#tableBorderSize#}" bgcolor="{#tableBgColor#}">
<tr bgcolor="{#rowBgColor#}">
<td>First</td>
<td>Last</td>
<td>Address</td>
</tr>
</table>
</body>
</html>

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='這是其他'

執(zhí)行結(jié)果:

微信圖片_20180313092919.png


section ="Person"時(shí)運(yùn)行結(jié)果:

微信圖片_20180313093218.png



#########
繼續(xù)學(xué)習(xí)
||
<?php echo "config_load函數(shù)";
提交重置程式碼