问题描述:

This question already has an answer here:

  • How to fix “Headers already sent” error in PHP

    11 answers

网友答案:

I would check that you have no closing PHP tag in any of your models, controllers or libraries - this will often cause this type of error.

网友答案:
  //Your Code is for redirect
    redirect('site/function1');

    //Alternate Code for solve this issue
    $url = 'site/function1';
    echo'
    <script>
    window.location.href = "'.base_url().'index.php?/'.$url.'";
    </script>
    ';

Why I'm getting "cannot modify header information headers already sent by registration_model" error in codeigniter?

相关阅读:
Top