php - Should I call exit() after calling Location: header?

后端 未结 5 1194
情书的邮戳
情书的邮戳 2020-11-22 03:38

After calling the redirect function header, should I call exit or not?



        
5条回答
  •  北海茫月
    2020-11-22 04:11

    You definitely should. Otherwise the script execution is not terminated. Setting another header alone is not enough to redirect.

提交回复
热议问题