0

Is there a way to prevent a php script from sending a http response when the script is finished executing? If not in php is it possible in any-other common web scripting langues?

3
  • ...just don't echo/return anything? Commented Nov 16, 2009 at 22:16
  • could you give more details of what you're trying to achieve? Commented Nov 16, 2009 at 22:17
  • What would you want to happen instead? Let the browser hang there wasting one of its TCP/IP threads waiting for a response until the connection times out? Commented Nov 16, 2009 at 22:18

3 Answers 3

2

I believe that would be something controlled by the web server, not the scripting language.

Sign up to request clarification or add additional context in comments.

1 Comment

Agreed. PHP just terminate the script. Then Apache replies back to the client to send "no data" in addition to a header 200 OK.
0

assuming no headers have been sent, just die();

Comments

0

No, but you can send a http 204 (No Content).

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.