The
PHP jump, that is, redirecting the browser to the specified URL, is a very common feature. This feature also has some detail requirements, such as how many seconds to wait for the jump, with no JavaScript implementation jump, and so on. The following jump methods take into account a lot of, and parameterized, can be used in specific projects.
<?php/** * Redirect browser to the specified URL * * @param string $url the URL to redirect * @param int $delay How many seconds to wait to jump * @pa RAM BOOL $JS Indicates whether to return JavaScript code for jumps @param bool $jsWrapped indicates whether to use <mce:script type= when returning JavaScript code Text/java Script ><!--label to wrap * @param bool $return Indicates whether the generated JavaScript code is returned/function redirect ($url, $delay =
0, $js = False, $jsWrapped = True, $return = False) {$delay = (int) $delay; if (! $js) {if (headers_sent () | | $delay > 0) {echo <<<eot