PHP Header issue with ob_start() and ob_end_flush()

前端 未结 5 1123
醉话见心
醉话见心 2020-12-21 12:56

I get header problem while I use ob_start() in the beginning of a page and ob_end_flush() at the end. Because I use header function after some quer

5条回答
  •  死守一世寂寞
    2020-12-21 13:49

    I'm a bit baffled the warning message doesn't include the location of the code that caused the first content to be sent to the client. The function headers_sent() can return that location, too. So, for debugging purposes, please try

    if($delHourExist)
    {
      if ( headers_sent($path, $lineno) ) {
        echo '
    Debug: output started at ', $path, ':', $lineno, "
    \n"; } header("location: edit_delivery_hours.php"); }

提交回复
热议问题