The PHP jump, which redirects 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 after the jump, with no JavaScript to achieve jump, and so on. The following jump method takes into account a lot, and parameterization, can be used in specific projects.
'; } if ($return) {return $out; } Echo $out; Exit }?>
The writing of a generic operation hint class
In the design of some systems, often need to give users to operate the prompt. This hint is important, and friendly hints can improve the user's goodwill towards the system. Operation Tips There are a lot of designs, here is a humble plan for me, just a tip.
Tips = "
$string return (auto return after 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 class is simple enough to jump to a link after 4 seconds, or click to jump to that link.
__tostring () This function is very important, it can implement the string output of the class object.
How do you use this class?
Include_once ("./tips_class.php"); $hit = "Error: Two passwords entered are inconsistent"; $jump = ". /login.php "; Echo $tips = Tips::get_tips ($hit, $jump);
http://www.bkjia.com/PHPjc/755772.html www.bkjia.com true http://www.bkjia.com/PHPjc/755772.html techarticle The PHP jump, which redirects the browser to the specified URL, is a very common feature. This feature also has some details of the requirements, such as the number of seconds to wait after the jump, with no javascr ...