Computer Science, asked by Anonymous, 1 year ago

How does one prevent the following Warning ‘Warning: Cannot modify header information – headers already sent’ and why does it occur in the first place?

Answers

Answered by EHSASS
1

░▒▓█►─═ ʜᴇʀᴇ ɪs ʏᴏᴜʀ ᴀɴsᴡᴡᴇ ═─◄█▓▒░

The candidate should not output anything to the browser before using code that modifies the HTTP headers.

Once the developer calls echo or any other code that clears the buffer, the developer can no longer set cookies or headers.

That is also true for error messages, so if an error happens before using the header command and the INI directive display_errors is set, then that will also cause that error to show.

ᴇʜsᴀss

Answered by saivivek16
0

Answer:

Explanation:

The one should not be output anything in browser before using code that the modifies by the http headers.

Hope it will help you

Similar questions