config_load 함수
config_load 함수
사용법:
구성 파일에는 여러 부분이 포함될 수 있습니다. 이 경우 추가 속성 섹션을 사용하여 변수를 가져올 부분을 지정할 수 있습니다.
참고 : 구성 파일에서 섹션과 템플릿 내장 함수 섹션은 이름이 같을 뿐 서로 관련이 없습니다.
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='这是其他'
실행 결과:

section="Person"일 때 실행 결과:


