![]() |
|
首页 │ Apache │ Linux│ Java│ MySQL│ 注册│帮助 | |||
index.htm:
{foreach from=$news_array item=newsID}
{ $newsTitle }
{foreachelse}
{/foreach }
test.php:
include_once "Smarty.class.php";
$smarty = new Smarty();
$smarty->template_dir = "/PHPTemple/templates";
$smarty->compile_dir = "/PHPTemple/templates_c";
$smarty->cache_dir = "/PHPTemple/cache";
$smarty->cache_lifetime = 0;
$smarty->caching = true;
$smarty->left_delimiter = "{";
$smarty->right_delimiter = "}";
$newCommand = new NewCommand();
$sql="Select * From product Where isChild='Y' Order By id Desc";
$result=mysql_query($sql);
$news_array= mysql_fetch_array($result);
$smarty->assign("news_array",$news_array);
$smarty->display("index.htm");
然后我运行test.php后,出现一种情况,确实没有报错!
不过,浏览器状态栏好像处在打开状态,请问是怎么一回事?

