时间:2021-07-01 10:21:17 帮助过:18人阅读
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] . '
';
// }
$content = $smarty->fetch ( "products.tpl" );
$file_name = './products/' . $c [id] . '.html';
//html生成
create_html ( $file_name, $content );
}