發(fā)表日期:2018-09 文章編輯:小燈 瀏覽次數(shù):4122
phpok4中使用的模板語法參考了ET(Ease Template)和Smarty的一些思路,全新重新編寫
對(duì)應(yīng)程序文件是:framework/phpok_tpl.php 文件
模板標(biāo)簽的基本說明:
模板標(biāo)簽都是使用定界符包圍,phpok的模板框架定界符不允許修改。
大括號(hào) { 和 } 是最基本的定界符
循環(huán)和條件允許使用 <!-- 和 --> 作為定界符
數(shù)組允許用點(diǎn)來分割,如:{$config.title},對(duì)應(yīng)的php代碼即為 <?php echo $config[title];?>,傳統(tǒng)模板寫法{$config[title]} 仍然原生支持
模板中支持PHP語法:
單行<!-- php:這里輸入相應(yīng)的PHP代碼 -->
多行<!-- php -->PHP代碼<!-- /php -->
引用模板用:<!-- include tpl=模板名稱 -->
引用php文件用:<!-- include file=php文件名 -->
引用其他模板文件:<!-- include tpl=模板文件名 -->
日期:2018-09 瀏覽次數(shù):4121
日期:2014-10 瀏覽次數(shù):3447
日期:2014-10 瀏覽次數(shù):3205
日期:2014-10 瀏覽次數(shù):3277
日期:2014-10 瀏覽次數(shù):3337
日期:2014-10 瀏覽次數(shù):3280
日期:2014-10 瀏覽次數(shù):3348
日期:2014-10 瀏覽次數(shù):3310
日期:2014-10 瀏覽次數(shù):3321
日期:2014-10 瀏覽次數(shù):3365
日期:2014-10 瀏覽次數(shù):3528
日期:2014-10 瀏覽次數(shù):3105
日期:2014-10 瀏覽次數(shù):3259
日期:2014-10 瀏覽次數(shù):3397
日期:2014-10 瀏覽次數(shù):3152
日期:2014-10 瀏覽次數(shù):3620
日期:2014-10 瀏覽次數(shù):3198
日期:2014-10 瀏覽次數(shù):3350
日期:2014-10 瀏覽次數(shù):3168
日期:2014-10 瀏覽次數(shù):3470
日期:2014-10 瀏覽次數(shù):3194
日期:2014-10 瀏覽次數(shù):3216
日期:2014-10 瀏覽次數(shù):3216
日期:2014-10 瀏覽次數(shù):3937
Copyright ? 2013-2018 Tadeng NetWork Technology Co., LTD. All Rights Reserved.