1. Use HTTP header information
That is, use PHP’s HEADER function. The function of the HEADER function in PHP is to issue control instructions to the browser that should be passed through the WEB server specified by the HTTP protocol, such as declaring the type of return information ("Context-type: xxx/xxx"), the attributes of the page ("No cache", "Expire"), etc.
The method of redirecting to another page using HTTP header information is as follows:
Copy the code The code is as follows:
if (isset($url))
{
Header("HTTP/1.1 303 See Other");
Header("Location: $url");
exit; //from www.w3sky.com
}
?>
Copy the code The code is as follows:
if (!isset($url)) exit;? >
$url="http://www .jb51.net";
echo "