php程序运行时出现了无法找到该页面,该如何解决?

bei213 2009-12-03 04:20:58
list.php:
<?php
require("config.php");
$result=$db->query("select title from people");
$list=array();
while($rs=$db->fetch_array($result))
{
$list[]=$rs;
}
$smarty->assign("p",$list);
header("Location:list.htm");


?>
list.htm:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>

<body>

<table width="555" border="1">
{section name=list loop=$p}
{if (($smarty.section.list.index+1) mod 4)==1}
<tr>
{/if}
<td>{$p[list].title}</td>
{if (($smarty.section.list.index+1) mod 4)==0}
</tr>
{/if}
{/section}
</table>
</body>
</html>

...全文
336 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
zhouyouben 2009-12-04
  • 打赏
  • 举报
回复
exit(exception);
x1987xiaoxiao 2009-12-04
  • 打赏
  • 举报
回复
smarty模板,转到显示页面不用header
$smarty->display('list.html');

21,891

社区成员

发帖
与我相关
我的任务
社区描述
从PHP安装配置,PHP入门,PHP基础到PHP应用
社区管理员
  • 基础编程社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧