Home >Backend Development >PHP Tutorial >Three practical PHP message functions

Three practical PHP message functions

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-07-25 09:01:541027browse

Because there is no msgbox, PHP programs often use JavaScript+DOM to pop up message boxes or jump to web pages. During the development of the Shuguang examination platform, in order to reuse the code, a simple function was written and saved in a file, which can be referenced when needed. Although it is a bit childish, it is economical and practical.

  1. /*1. Pop-up message*/
  2. function aler($msg)
  3. {
  4. echo "";
  5. }
  6. /*3. Delay for the specified number of seconds and then jump to the specified webpage*/
  7. function goto($tim,$goto)
  8. {
  9. echo "";
  10. }
  11. /************************
  12. //Application example
  13. aler("Thanks for browsing!");
  14. msge("Sorry, need to start again!");
  15. msge("Welcome!","http://www.sgksw.net");
  16. goto(5,"http://www.sgksw.net");
  17. ************ *****************/
Copy code


Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn