[Use the header () function]
The HTTP-related function type of PHP provides a header () function. First, it must be clear that the header () function must be placed at the beginning of the php program, and there cannot be another header () the function or setcookie () is called. If it contains webpage output, this statement must be placed before the <HEAD> </HEAD> mark.
Use the following statement:
<?
Header ("location: http://www.bibias.com ");
Exit;
?>
As long as this statement is executed, the web page will be automatically redirected to the http://www.bibias.com
[Use HTML to mark redirection]
<HTML>
<HEAD>
<?
If (isset ($ url ))
{
Echo "<META HTTP-EQUIV = \" refresh \ "CONTENT = \" 5; url = $ url \ "> ";
}
?>
</HEAD>
<BODY>
</BODY>
</HTML>
CONTENT = "5; url = $ url" indicates that after 5 seconds, the webpage will automatically turn to the address $ url.
[Implement redirection using js Scripts]
<Html>
<?
$ Url = "http://www.bibias.com ";
Echo "<script language = \" javascript \ "> ";
Echo "location. href = \" $ url \"";
Echo "</script> ";
?>
</Html>
I don't have much time to learn about it. I prefer to use javascript.
Author: Qingyi