The docs I read don’t seem clear on this issue.
When calling exit() with no arguments, does the server still send something back to the client?
If so, is there an alternative or way to keep anything from being sent to the client on exit?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
exitis basically the same as reaching the end of the file. Anything that has already been sent will be received by the browsers, and any output buffers will be processed and also sent.You can force an empty response by include
ob_start()as your first line of code, and using this function:However the headers will still be sent. This just empties the response body.