I got this mistake often previously, and I am sure all PHP software engineer got this blunder in any event once previously.
Solution 1
This blunder may have been brought about by the clear spaces before the beginning of the record or after the finish of the file. These clear spaces ought not to be here.
echo "your code here";
?>
THERE SHOULD BE NO BLANK SPACES HERE
Solution 2:
If this isn't your case, at that point use ob_start to yield buffering:
<?php
ob_start();
// code
ob_end_flush();
?>