Cannot modify header information - headers already sent by on line 6

I have the code down below but it keeps generating the warning:
Cannot modify header information - headers already sent by

<?php ob_start(); Header('Location: index.php'); ?>

Someone know what i am doing wrong?

Good day!

Try the following one:

<?php ob_start(); Header('Location: index.php'); ob_end_flush(); ?>

If that doesn’t work, make sure no other character is sent to client before headers. Add the following to your .htaccess file:

php_value output_buffering on

This topic was automatically closed after 3 days. New replies are no longer allowed.