1

I am referring to "Cannot modify header information - headers already sent" warning, i know how to get rid of it and etc. I'm not sure why its can't redirect though.. Seems to like it it should simply head over to the new page, who cares what i have on my current page?

Don't Panic
  • 41,125
  • 10
  • 61
  • 80
Eddy
  • 61
  • 1
  • 2
  • 8
  • 1
    It is stated here : https://stackoverflow.com/questions/8028957/how-to-fix-headers-already-sent-error-in-php – Don't Panic May 10 '18 at 16:13
  • The answer to that question covers more than just how to fix the problem. The thing is, "headers already sent" means that the entire headers part of the HTTP response has been sent already and you're into sending the response body. You can't send more headers at that point. – Don't Panic May 10 '18 at 16:15
  • If browsers still interpreted headers even after the body had begun, I wouldn't be able to write this: `Location: https://mailicious-site.com` without redirecting you there – iainn May 10 '18 at 16:17
  • See the "Why does it happen?" section of the answer to the linked duplicate. – Don't Panic May 10 '18 at 16:17

0 Answers0