You cannot send headers after sending any data to the client.
However, using require does not mean that you are issuing something. If I understand your right, you can include your database files, run your queries, and then redirect the user. This is absolutely true.
If you need to send some kind of result (why, if you need to do a redirect?), Another option is to use output buffering. Using output buffering, you do not send data to the browser when echoing, but you save it in the buffer. Data will be sent when ob_end_flush is called, or you will reach the end of the script. After ob_end_flush, you will not be able to send new headers. You start buffering output with ob_start .
alexn source share