PHP jump function and a common operation prompt class to write PHP jump, that is, redirect the browser to the specified URL, is a very 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. & Lt ;? Php *** redirects the browser to the specified URL. PHP jump function and writes a common operation prompt class.
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.
';} If ($ return) {return $ out;} echo $ out; exit ;}?>
Compilation of a common operation prompt class
When designing some systems, users are often prompted for the operation. This kind of prompt is very important, and friendly prompt can improve the user's sense of the system. There are a lot of design tips. Below is a simple solution for me.
Tips ="
$ String
Return (automatically returned in 4 seconds)
"; Return $ this-> tips;} public function _ toString () {return $ this-> tips;} private function _ clone () {} public static function get_tips ($ string, $ url) {if (FALSE = (self ::$ _ instance instanceof self) {self :: $ _ instance = new self ($ string, $ url);} return self ::$ _ instance ;}}?>
This type of function is very simple, that is, jump to a link after 4 seconds, or click to jump to that link.
The _ toString () function is very important. it can implement the string output of class objects.
How to use this class?
Include_once (". /tips_class.php "); $ hit =" error: The two passwords are inconsistent "; $ jump = ".. /login. php "; echo $ tips = Tips: get_tips ($ hit, $ jump );