标题位置已发送

Sorry for asking this common question again, but I couldn't find the answer. So I'm getting this error in my menu.php that im including in my index:

"Cannot modify header information - headers already sent by (output started at /home/andxeavr/public_html/bulfit.com/benching/index.php:61) in /home/andxeavr/public_html/bulfit.com/benching/includes/menu.php on line 20"

This is my index line 61:

include('includes/menu.php');

And this is my menu.php:

if (isset($_POST['search_sub'])) {

header("Location: sign_up.php");

}

So I tried with ob_start() and the other liked answers but it didn't worked.

this question has already been answered too many times:

How to fix "Headers already sent" error in PHP

but still : You can try to avoid headers location already sent error by using on the top of file :

ob_start();

but also try to look at your code and take a look if you don't have any extra spaces in your code and you don't have any space before starting the opening tag of php from starting of file. :

<?php
  header("Location: /");
?>

And also look inside the menu.php file that you don't have any space before

   <?php

then make

<?php