li3254093
注册会员

UID 81327
精华
0
积分 62
帖子 24
金钱 62 喜悦币
威望 0
人脉 0
阅读权限 20
注册 2006-10-10
状态 离线
|
[广告]: Enom域名自助付费 自助注册 自助PUSH 主流域名COM等一律57.99元年
求助高手帮忙解决基本的smarty 问题
require("smarty.inc");
require("conn.inc");
$strQuery = "select * from product_bigclass";
$result = mysql_query($strQuery);
while($row = mysql_fetch_array($result)){
$array[] = array("id", substr($row["id"], 0, 40),
"title", substr($row["title"], 0, 40));
}
$smarty->assign("News_MU", $array);
unset($array);
mysql_free_result($result);
//引用模板文件
$smarty->display('index.html');
这里是程序文件
<{section name=loop loop=$News_MU}>
<{$News_MU[loop].title}>
<{section}>
这是模板文件, 为什么。始终读不出数据库的值啊
|
|