请问一个php 错误Cannot modify header information - headers already sent by
我的许多程序都是查不多一样的,就是在数据表部分有不同。
我有个修改数据表的程序upddish.html:
<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8"/>
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="0">
<title>更改食材信息</title>
<meta name="author" content="作者" />
<meta name="Keywords" content="快餐,中餐" />
<meta name="Description" content="中餐,饮料,糕点" />
<link rel="stylesheet" type="text/css" href="/cater/cater.css">
.....
然后去调用另一个sltupddish.php:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript">
...
</script>
</head>
<body>
<?php
$dp=$_SERVER['DOCUMENT_ROOT'];//获取根目录
include($dp."/cater/comm.php");
session_start();
可是在执行时出错了:
Cannot modify header information - headers already sent by
(output started at D:\wamp\www\cater\input\sltupddish.php:164) in D:\wamp\www\cater\comm.php on line 4
其中comm.php:
<?php
header("Content-Type: text/html;charset=utf-8");
header("Last-Modified: " . gmdate( "D, d M Y H:i:s" ) . "GMT" ); //标记内容最后修改时间
header("Cache-Control: no-cache, must-revalidate" ); //强制不缓存
...
可是我其他的,比如删除数据表也是都有以上的代码,它们不会出错,为什么只有这个修改的会出错?
如何修改?