当前位置:网站首页>CI框架如何集成Smarty模板
CI框架如何集成Smarty模板
2022-07-28 06:51:00 【51CTO】
一、下载Smarty模板和CI框架
1.https://codeigniter.org.cn/
2.Smarty官网https://www.smarty.net/
二、文件拷贝和扩展核心类库
1. 将下载下来的smarty-3.1.30(可以下载其他版本,原理一样)存放到application/libraries/目录下.
2. 在application/libraries目录下新建文件Cismarty.php,内容如下:
3. 在application/config的文件中新建smarty.php,内容如下:
4. 在入口文件创建'templates、cache、configs目录
5. 在application/config/下找到autoload.php文件
$autoload[‘libraries’] = array(‘cismarty’);
6. 在application/core目录下新建MY_Controller,内容如下
7. 新建控制器Test.php
8. 新建视图test
9. 配置完成.
边栏推荐
- Can the variable modified by final be modified
- Autodesk desktop licensing service error 1067 handling method
- 豪华版h5俄罗斯方块小游戏源码
- js糖果消消乐小游戏源码
- Can‘t connect to server on ‘IP‘ (60)
- CarSim simulation quick start (XIII) - steering system
- 2022 Niuke multi school second problem solving Report
- No super high-rise buildings | new regulations: what information does it reveal that no new buildings above 500 meters should be built?
- File operation of QT
- 2021-07-02
猜你喜欢

阻塞队列LinkedBlockingQueue 源码解析

What happens when you unplug the power? Gaussdb (for redis) dual life keeps you prepared

Find out whether the number exists from the matrix

One key switch circuit

How to build the protection system of class protection technology of 2022 series of ISO compliance (Part I)

【MindSpore易点通机器人-01】你也许见过很多知识问答机器人,但这个有点不一样

C#,入门教程——程序运行时的调试技巧与逻辑错误探针技术与源代码

Can‘t connect to server on ‘IP‘ (60)

2022 Niuke multi school second problem solving Report

VK1620温控仪/智能电表LED数显驱动芯片3/4线接口内置 RC振荡器,提供技术支持
随机推荐
QT 怎么删除布局里的所有控件?
Es6: template string
MCU IO port controls 12V voltage on and off, MOS and triode circuit
Usage of constructors
金属质感登录框样式
数字签名和CA证书
Usage of qgroupbox
The core packages and middleware required for golang development cover all areas of the project and are worth collecting
Usage of qcombobox
An article to understand data warehouse: metadata classification, metadata management
Mechanical revolution Jiaolong P wired network card driver can't play
What if the computer folder cannot be renamed?
QT uses semaphores to control threads (qsemaphore)
Can‘t connect to server on ‘IP‘ (60)
2022 Niuke multi school second problem solving Report
五张图看懂EMI电磁干扰的传播过程-方波陡峭程度对高频成分的影响,时序到频域频谱图形,波形形状对EMI辐射的影响。
[Err] 1055 - Expression#2 of select list is not in GROUP BY clause and contains nonaggregated column
Understanding of spark operator aggregatebykey
uniapp的swiper动态设置current值不生效解决办法
CarSim simulation quick start (XII) - Driver Model (2)