We used to get below error when using header() in our php code.
Warning: Cannot modify header information - headers already sent by (output started at...
The reason/root cause for this warning is due the fact "No other information can be sent to the server before the Header".
This "headers already sent" error is usually caused by having white space before or after the opening and closing PHP tags (<?php . . . ?>).
So, remove any white space before or after these tags.
If you still get this error even after removing white space, you need to check whether you put echo of any text before using header().
Use of ob_start() at start of the code may resolve this issue.
More Articles...
Search This Blog
AI Course | Bundle Offer | Unlocking AI | Dream Big | Listen to Dream Big
Today's Deals | Timesheet | Products | SQL ebook | Earn 50% commission
About | Privacy | Follow | TOS | WhatsApp | Contact
I may earn a commission from Amazon affiliate links
Today's Deals | Timesheet | Products | SQL ebook | Earn 50% commission
About | Privacy | Follow | TOS | WhatsApp | Contact
I may earn a commission from Amazon affiliate links
No comments:
Post a Comment