方法一:header("Location: index.php");
方法二:echo "<script>window.location =\"$PHP_SELF\";</script>";
方法三:echo "<META HTTP-EQUIV=\"Refresh\" CONTENT=\"0; URL=index.php\">";
方法四:<?php
ob_start();
?>
html代码
<?
ob_clean();
include("next.php");
ob_end_flush();
?>
方法二:echo "<script>window.location =\"$PHP_SELF\";</script>";
方法三:echo "<META HTTP-EQUIV=\"Refresh\" CONTENT=\"0; URL=index.php\">";
方法四:<?php
ob_start();
?>
html代码
<?
ob_clean();
include("next.php");
ob_end_flush();
?>
echo "<META HTTP-EQUIV=\"Refresh\" CONTENT=\"0; URL=index.php\">"; CONTENT=\"0; 后面的参数表示等待跳转的秒数。也可以用以上任意一个,在之前加上sleep()函数来停顿几秒钟。