PHP 笔记
PHP页面跳转方式
PHP 跳转
< ?php
//重定向浏览器
header("Location: http://blog.csdn.net/abandonship");
//确保重定向后,后续代码不会被执行
exit;
?>
PHP + HTML 跳转
<?php
$url = "http://blog.csdn.net/abandonship";
?>
<html>
<head>
<meta http-equiv="refresh" content="1;url=<?php echo $url; ?>">
</head>
<body>
It's transit station.
</body>
</html>
PHP + JS 跳转
<?php
$url = "http://blog.csdn.net/abandonship";
echo "<script type='text/javascript'>";
echo "window.location.href='$url'";
echo "</script>";
?>
引入文件
<?php include 'footer.php';?>