[Reprint] how can I learn PHP redirection in three ways ??? How to learn three methods of PHP redirection: wenku.baidu.comview794fec76a415866fb84a8e63.html ??? 1. use HTTP header information ??? That is, use the php header function. The HEADER function in PHP is used to send a browser with three methods for learning PHP redirection, which are defined by the HTTP protocol.
?
?
?
Three methods for learning PHP redirection
Http://wenku.baidu.com/view/794fec76a417866fb84a8e63.html ??? I,HTTP header information
??? That is, use the php header function. The HEADER function in PHP is used to send control commands that should have been specified by the HTTP protocol to the browser through the WEB server. for example, to declare the type of the returned information ("Context-type: xxx/xxx "), page attributes (" No cache "," Expire "), and so on.
??? To redirect an HTTP header to another page, follow these steps: $ Url = http://www.mycodes.net; If (isset ($ url )) { Header ("Location: $ url "); } ?> ??? Note: "Localtion:" There is a space behind it. if it is not added, it can also be used, but it is better to add it for correctness.
??? II,Mark with HTML
??? The HTML tag is the REFRESH tag of META, for example:
$ Url = http://www.mycodes.net; If (! Isset ($ url ))??? ? { Exit ('No jump address you '); } ?> ??? Note: content = "5; url = 'http: // www.mycodes.net '" indicates the jump address and will be executed in 5 seconds.
??? III,Implement with scripts
$ Url = http://www.mycodes.net; Echo" |