西部数码主机 | 阿里云主机| 虚拟主机 | 服务器 | 返回乐道官网
当前位置: 主页 > php教程 > php教程 >

PHP重定向和页面快速转向

时间:2016-02-05 10:12来源: 作者: 点击:
PHP重定向和页面快速转向 ? function turntopage($url=index.php,$info = 页面转向中...,$second=2){ print htmlnheadntitle页面转向中..../titlen; print meta http-equiv=refresh content=$second;url=$urln; //开源代码vcphp.com
PHP重定向和页面快速转向
 
<?  
function turntopage($url="index.php",$info = "页面转向中...",$second=2){  
print "<html>n<head>n<title>页面转向中....</title>n";  
print "<meta http-equiv="refresh" content="$second;url=$url">n"; //开源代码vcphp.com 
print "<style type="text/css">n<!--n";  
print "td { font-family: "verdana", "arial";font-size: 12px}n";  
print "a {color: #000000; text-decoration: none}n";  
print "-->n</style>n";  
print "</head>n<body>n";  
print "<table width="100%" border="0" align="center">n"; 
//111cn.net 
print " <tr>n";  
print " <td height="200"> </td>n";  
print " </tr>n";  
print " <tr>n";  
print " <td align="center">n";  
print " <table width="60%" border="0" cellpadding="8" bgcolor="#aa9fff">n"; 
//开源代码 
print " <tr>n";  
print " <td height="30" align="center">页面转向提示信息</td>n";  
print " </tr>n";  
print " <tr>n";  
print " <td align="center">$info</td>n";  
print " </tr>n";  
print " <tr>n"; 
print " <td align="center">n";  
print " <a href="$url">如果你的浏览器不支持自动跳转,请按这里</a></td>n";  
print " </tr>n";  
print " </tr>n";  
print " </table></td>n";  
print " </tr>n";  
print " <tr>n"; //开源 
print " <td height="200"> </td>n";  
print " </tr>n";  
print "</table>n";  
print "</body>n</html>";  
exit;  
?> 
php重定向
 
<?  
方法一:header("location: index.php");  
方法二:echo "<scrīpt>window.location ="$php_self";</scrīpt>"; 
//开源代码 
方法三:echo "<meta http-equiv="refresh" content="0; url=index.php">";  
?> 
(责任编辑:好模板)
顶一下
(0)
0%
踩一下
(0)
0%
------分隔线----------------------------
栏目列表
热点内容