![](https://img-blog.csdnimg.cn/20201014180756923.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Smarty
NingFat
这个作者很懒,什么都没留下…
展开
-
Smarty界定符冲突
左定界符和右定界符定义作用:解决css代码 { }或者 javascript的{}界定符冲突 代码: $smarty->left_delimiter='<{'; //设置模板语言中的左结束符 $smarty->right_delimiter='}>'; //设置模板语言中的右结束符...原创 2018-12-02 17:57:28 · 401 阅读 · 0 评论 -
Smarty的日常学习(一)
(1)设置或读取视图文件目录 Smart本身有些默认的目录设置。(查看Smarty源类文件smarty.class.php构造方法,对所有的目录进行了初始化) DS说明:斜线的意思 DIRECTORY_SEPARATOR动态斜线。会随着系统变化而变化。 具体的配置代码写法: $smarty ->setTemplateDir(ROOT.'templates/'); //设置...原创 2018-12-02 21:47:38 · 178 阅读 · 0 评论 -
PHPdate_format不识别time()函数问题(待解决)
根据smarty手册,可以直接使用{$smarty.now|date_format:'%Y-%m-%d %H:%M:%S'}。但是程序显示。Warning: date_format() expects parameter 1 to be DateTimeInterface, integer given in E:\PhpStudy20180211\PhpStudy\PHPTutorial\WWW\...原创 2018-12-05 15:36:08 · 1463 阅读 · 0 评论