PHP header after the need to write exit to terminate the program, has not been too concerned about, today encountered a bug, only to find that this is still a problem, deliberately wrote a piece of code test, the code is as follows:
The result proves that the PHP file runs if it encounters a header ("Location: a page URL"), and the statement jumps directly to another page, but the jump here does not affect the continuation of the current PHP file. That is to say, after the PHP header jump, the current page of the script will continue to execute. If you need to terminate the script, you need to add exit () or Die ().
Articles you may be interested in
- PHP get_headers to determine if the URL is valid
- function and usage of PHP get_headers functions
- PHP with header () to achieve file download, download the file hint is broken can not open the solution
- PHP Simulation get_headers function
- PHP header 404 Jump error page of the wording
- Summary of usage of PHP header
- Usage and differences in PHP that jump out of multiple loops using Break,continue,goto,return,exit
- PHP finds whether a value exists in the array (In_array (), Array_search (), array_key_exists ())
http://www.bkjia.com/PHPjc/764074.html www.bkjia.com true http://www.bkjia.com/PHPjc/764074.html techarticle PHP Header after the need to write exit to terminate the program, has not been too concerned about, today encountered a bug, only to find this is still a problem, deliberately wrote a piece of code test, code such as ...