PHP页面跳转几种实现技巧

PHP页面跳转一:header()函数

<?php

header("Location: http://baidu.com");
exit();

?>

PHP页面跳转二:meta标签

< meta http-equiv="refresh" content="1;url=http://baidu.com">

PHP页面跳转三:JavaScript

<?php  
$url = "http://baidu.com";
echo "< script language='javascript' type='text/javascript'>";
echo "window.location.href='$url'";
echo "< /script>";
?>

相关推荐