方法一:
<?php
$GoTo="index.php";// 假如這裡的目標鏈接取自數據庫就實現了動態轉向
header(sprintf("Location: %s", $GoTo));
?>
方法二:
<?php echo "<script>window.location ="$PHP_SELF";</script>";?>
方法三:
<?php echo "<META HTTP-EQUIV="Refresh" CONTENT="0;URL=index.php">";?>