PDA

查看完整版本 : include 和 header()


feinst
2001-03-27, 16:31
各位大侠,我在redhat7中遇到一个问题, include和header()中似乎有问题,代码如下:
  
<? // file name login.php

include ("getmysql.inc");
$dbhand=mysql_connect("feinst","root","");
mysql_select_db("mall",$dbhand);
header("location:account.php");
?> 

而这个getmysql.inc文件中没有任何内容。一执行login.php,就出现:
  Warning: Cannot add header information - headers already sent by (output started at getmysql.inc:20) in /var/www/html/mall/php/login.php on line 6

  请问各位,这是怎么回事,多谢了!!!