日期:2014-05-16 浏览次数:20411 次
foreach ( $category as $c ) {
$products = $util->getArrayByQueryString ( "select * from product_detail where sid=$c[id]" );
$smarty->assign ( "html_title", $c [name] . ':所有子类产品' );
$smarty->assign ( "products", $products );
// foreach ( $products as $p ) {
// echo $p [id] . $p [name] . '<br/>';
// }
$content = $smarty->fetch ( "products.tpl" );
$file_name = './products/' . $c [id] . '.html';
//html生成
create_html ( $file_name, $content );
}