It's transit station. PHP頁面跳轉三、JavaScr..."/>         It's transit station. PHP頁面跳轉三、JavaScr..."/>
網路城邦
上一篇 回創作列表 下一篇   字體:
php 頁面自動跳轉
2017/06/19 23:02:58瀏覽456|回應0|推薦0
PHP頁面跳轉一、header()函數

< ?php 
//重定向瀏覽器 
header("Location: http://blog.csdn.net/abandonship"); 
//確保重定向後,後續代碼不會被執行 
exit;
?> 

PHP頁面跳轉二、Meta標簽
<?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頁面跳轉三、JavaScript
<?php  
$url = "http://blog.csdn.net/abandonship";
echo "<script type='text/javascript'>";
echo "window.location.href='$url'";
echo "</script>"; 
?> 
( 休閒生活網路生活 )
回應 推薦文章 列印 加入我的文摘
上一篇 回創作列表 下一篇

引用
引用網址:https://classic-blog.udn.com/article/trackback.jsp?uid=samdeng&aid=104852618