PHP redirection, that is, redirecting a browser to a specified URL, is a common function. This feature also has some detailed requirements, such as the number of seconds to wait for the jump, the use of JavaScript to achieve the jump, and so on. The following jump method takes into account a lot of parameters and can be used in specific projects.
<? Php/*** redirect the browser to the specified URL ** @ param string $ url the url to be redirected * @ param int $ how many seconds after delay waits * @ param bool $ js indication whether to return the JavaScript code for redirect * @ param bool $ jsWrapped indicates whether to use <mce: script type = "text/javascript"> <! -- Label for packaging * @ param bool $ return indicates whether to return the generated JavaScript code */function redirect ($ url, $ delay = 0, $ js = false, $ jsWrapped = true, $ return = false) {$ delay = (int) $ delay; if (! $ Js) {if (headers_sent () | $ delay> 0) {echo <EOT