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...
Shop at Rajamanickam.com | Birthday Gift Idea? | Hire me for $6 per Hour
Get 3 useful ebooks for Rs 99 in India and $5.99 globally
Get a 75% commission | ChatGPT and and Google Gemini for Beginners (Use Discount code QPT)
Search This Blog
Art of Talking to AI | Tech eBook | Dream Big | Listen to Dream Big
Today's Deals | Timesheet | Products | 3 ebooks for $5.99 / Rs 99 | Earn 50% commission
About | Privacy | Follow | TOS | WhatsApp | Contact
I may earn a commission from Amazon affiliate links
Today's Deals | Timesheet | Products | 3 ebooks for $5.99 / Rs 99 | Earn 50% commission
About | Privacy | Follow | TOS | WhatsApp | Contact
I may earn a commission from Amazon affiliate links
No comments:
Post a Comment