Implementation of the PHP control front-end dialog box, And the php front-end dialog box
Application scenarios:
This requirement is derived from user confirmation during authorized logon;
The reason why the corresponding logic is not placed on the frontend is that this part of the logic is partial to functional services, so it is placed on the backend for convenient unified management.
Solution:
Use php echo to generate a javascript script. here we need to pay attention to the buffer zone.
The buffer zone should have three parts: php, webserver, and web browser, which can be output in real time through program code or configuration files. The background is relatively controllable, however, there are different browser buffer mechanisms at the front-end, so I have not studied them in depth. My solution is to allow non-real-time output.
One requirement to allow non-real-time output is that after the pop-up window is processed, no program jump is required. As follows:
<? Phpecho "<script> if (confirm ('select the response page, which means yes.html does not apply to HTML? ') Location.href0000'yes.html'; else location.href0000'no.html '; </script> "; // The following hearder Section cannot be added. // Header ('location: http://www.baidu.com ');?>
The above is the implementation method of the PHP control front-end pop-up dialog box introduced by the editor. I hope it will be helpful to you. If you have any questions, please leave a message. The editor will reply to you in time, thank you very much for your support for the help House website!