摘要: 在网上找了好多关于隔行改变样式的文章,都不符合自己的要求,所以自己想了好多办法,终于把隔行改变样式拿下! 这是模板文件中商品分类列表 <!--{foreach from=$categories item=cat name=sadxy}--> <!-- {if $smarty.foreach.sadx 阅读全文
posted @ 2018-07-20 20:20 阿波罗任先生 阅读(308) 评论(1) 推荐(0)
摘要: 本文实例讲述了PHP模板引擎Smarty内建函数section,sectionelse用法。分享给大家供大家参考,具体如下: section 是 Smarty 模板中除了 foreach 以外的另一种处理循环的方案,section 比 foreach 要灵活,就像是一个改进的 foreach 语句, 阅读全文
posted @ 2018-07-20 20:03 阿波罗任先生 阅读(461) 评论(0) 推荐(0)
摘要: http://www.smarty.net/http://smarty.php.net/manual/en/1.配置 define("ROOTPATH",dirname(__FILE__)."/../"); require_once("smarty/Smarty.class.php"); /** * 阅读全文
posted @ 2018-07-20 20:02 阿波罗任先生 阅读(178) 评论(0) 推荐(0)
摘要: 行变色 php页面 <?phpinclude "libs/Smarty.class.php";$smarty = new Smarty(); $link = mysql_connect('localhost','root','123');mysql_select_db('ecshop',$link) 阅读全文
posted @ 2018-07-20 20:01 阿波罗任先生 阅读(320) 评论(0) 推荐(0)