用PHP Header函数实现网页跳转
PHP自带函数跳转:
<?php
header(“location:http://www.pingziblog.com“)
?>
注意:使用Header函数时必须网页未产生任何输入,即必须放在网页最开始处
如果你要在服务器端跳转(需要支持ASP),可以这样:
<%
Response.Redirect “http://www.pingziblog.com ”
Response.End
%>
如果你要在客户端跳转,可以这样:
<script language=”javascript” type=”text/javascript”>
window.location=”http://www.pingziblog.com“;;
</script>
如果你要让页面显示几秒钟之后跳转,可以在html代码的<head></head>部分加上这样的代码:
<meta http-equiv=”refresh” content=”3; url=http://www.pingziblog.com“>
(3秒钟后自动跳转到www.pingziblog.com)
以上三种是也比较常见,比较常用的网页跳转代码,当然还有别的,大家可以自己收集。
例如:<html>
<head>
<meta http-equiv=”refresh” content=”13; url=http://www.pingziblog.com“>
</head>
<body>
<font color=red size=”3″ >正在等待网页跳转……</font>
</body>
<都被提取后 mysql_num_rows() 才能返回正确的值。








