我查了一下,都说用
header("location:xxx.php");
exit();
但是我用了之后,有个警告信息:
Warning: Cannot modify header information - headers already sent by (output started at H:/php/rijiben/add.php:6) in H:/php/rijiben/add.php on line 66
原来,如果使用 header,那么header之前不能有任何输出,但是这样页面就有点乱了,所以还是用js来实现吧
echo "<script language=javascript>";
echo "document.location.href='read.php'";
echo "</script>";
exit();
个人感觉还是用js比较好