header重定向问题 你可以这样啊~~echo "<META HTTP-EQUIV=\"Refresh\" CONTENT=\"0; URL="你想要的页面"">\r\n"; 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 header前有输出只能用其他方法重定向<?PHPecho "hello";$redirect = "<script>";$redirect .= "window.location.href='http://www.163.com'";$redirect .= "</script>";echo $redirect;?> <?PHPob_start();echo "hello";header("Location:http://www.163.com");?> 没有向客户端发送任何数据时可以用PHP 代码:header('location:target.php'); 其它情况我一般用PHP 代码:echo '<script language="javascript">location.href="target.php";</script>'; 不明白吗?那么为什么不看手册呢?header(PHP 3, PHP 4, PHP 5)...... 自 PHP 4 起,可以通过一些输出缓冲函数来解决这个问题。代价是把所有向浏览器的输出都缓存在服务器,直到下命令发送它们。可以在代码中使用 ob_start() 及 ob_end_flush() 来实现这样的功能,或者通过修改 php.ini 中的 output_buffering 配置选项来实现,也可以通过修改服务器配置文件来实现。 有没有什么成熟积分兑换系统? 发一个人站,php+mysql+smarty+pear+url_rewrite,大家学习交流 一个排名的问题 smarty如何清除指定模板的缓存? 满分求在smarty中用foreach遍历问题 smarty 的页面展示?头大了。。。 Xoops 版本升级遇到的问题 加快WEB页面上的图片显示速度?大家有啥心得没? 关于PHP和数据库的问题 关于php的函数fopen的问题,请大家帮忙!!以下是出错提示: 发送mail 关于eregi函数的小问题
<?PHP
echo "hello";
$redirect = "<script>";
$redirect .= "window.location.href='http://www.163.com'";
$redirect .= "</script>";
echo $redirect;
?>
ob_start();echo "hello";
header("Location:http://www.163.com");
?>
header('location:target.php'); 其它情况我一般用PHP 代码:
echo '<script language="javascript">location.href="target.php";</script>';
header
(PHP 3, PHP 4, PHP 5)
......
自 PHP 4 起,可以通过一些输出缓冲函数来解决这个问题。代价是把所有向浏览器的输出都缓存在服务器,直到下命令发送它们。可以在代码中使用 ob_start() 及 ob_end_flush() 来实现这样的功能,或者通过修改 php.ini 中的 output_buffering 配置选项来实现,也可以通过修改服务器配置文件来实现。