Detect whether the browser is refreshed or not using PHP
问题 I want to detect whether the browser is refreshed or not using PHP, and if the browser is refreshed, what particular PHP code should execute. 回答1: If the page was refreshed then you'd expect two requests following each other to be for the same URL (path, filename, query string), and the same form content (if any) (POST data). This could be quite a lot of data, so it may be best to hash it. So ... <?php session_start(); //The second parameter on print_r returns the result to a variable rather