php实现跳转的一个坑

被人看得见的努力,都是肤浅的努力
### 原文 If you don't put a die() or exit() after your header('Location: http://something') your script may continue resulting in unexpected behaviour. This may for example result in content being disclosed that you actually wanted to prevent with the redirect (HTTP 301). The aforementioned may not directly be visible for an end user as the browser may not render it (due to the 301). Conclusion, the exit() and die() functions stop the script from continuing.

翻译

这句话的意思是说如果你不在header(‘Location: http://something')你的脚本后面加上 die() 或者 exit(), 你的脚本就会继续向下执行,这样你的脚本就可能跳转不成功;

https://stackoverflow.com/questions/8665985/php-utilizing-exit-or-die-after-headerlocation