THInkPHP学习02---内置标签库使用

和其他PHP框架一样,thinkphp也有一套定义好的标签方便使用,像01讲里面用到的“volist”,同时自己自由定义也是可以的

系统默认标签库,cx,html。得在配置文件里面添加如下项

‘TAGLIB_BUILD_IN’=>’cx,html’, [前提:要确保和以后的自定义标签不重复]

意思是默认加载 cx. Html标签库。假如不写,系统就会只加载cx标签

也可以通过预加载模式给每个模板预先加载

‘TAGLIB_PRE_LOAD’ => ‘html’ ,

其中前者无需在模板文件页面引入Html标签库了,并且可以不带前缀直接使用Html标签库的标签:

Need a translation service?

Please enter your personal details and we will contact you shortly

    Words translated by CCJK

    146,096,379

    Our Client Satisfaction

    Rating for previous quarter

    5.00

    Over 95% of our clients recommend our language services to others

    Copyright © CCJK Technologies Co., Ltd. 2000-2023. All rights reserved.
    TOP