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">";
?>
(责任编辑:好模板) |