if(isset($article) && $article['cat_id'] > 2)
{
$smarty->display('article.dwt', $cache_id); } else
{
$smarty->display('article_pro.dwt', $cache_id);
}
修改为以下代码:
switch ($article['cat_id']){ case 8:
$smarty->display('article8.dwt',
$cache_id); break; case 9:
$smarty->display('article9.dwt',
$cache_id); break; case 2:
$smarty->display('article_pro.dwt',
$cache_id); break; default:
$smarty->display('article.dwt',
$cache_id); break;
}
解释:
case 9:
$smarty->display('article9.dwt',
$cache_id);
break;
版权声明: 本站资源均来自互联网或会员发布,如果侵犯了您的权益请与我们联系,我们将在24小时内删除!谢谢!