Home >Web Front-end >JS Tutorial >Summary of common page jump methods in php_javascript skills
Sometimes user pages will jump when writing PHP. Here we have collected several good jump methods that can be used.
Using 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 to redirect to another page using HTTP header information is as follows:
Marked with HTML
Use HTML tag, that is, use REFRESH tag of META, for example:
Use html features
Where: XX is the number of seconds, 0 means jump immediately. refresh means refresh. Url is the page to jump to.
Use script to implement
Another implementation using script
Use script to implement, the difference is the use of the open statement. And you can limit the original window to the parent window, child window or new window.
Change '_self' to limit the jump to the original window, parent window, child window or new window. The seventh method: use PHP's own function to send header information
The fastest and most powerful... But there is a problem that must be pointed out: if there is already html output before using this function, even if it is a space, then an error message will be displayed at the top of the page..
The above is the entire content of this article, I hope you all like it.