Saturday, March 30, 2013
10:34 PM

Solution: PHP setcookie Warning: Cannot modify header information - headers already sent

Solution: PHP setcookie Warning: Cannot modify header information - headers already sent to avoid this problem add ob_start() at beginning of php and add ob_end_flush() at end of php code like below


<?php
    ob_start(); // Initiate the output buffer

//your code

    ob_end_flush(); // Flush the output from the buffer
?>

0 comments:

Post a Comment