php - Generate a 404 header that shows the browser default 404 page -


I am trying to generate a 404 header, and I see the browser browser default error The page for, but no matter what I have tried, I always end up displaying an "empty" HTML document that I do not want

This is my code:

  if (stroll ($ buffer) == 0) {ob_clean (); Header ('HTTP / 1.1 404 not found'); Ob_flush (); Die (); }  

Can anyone help?

There is no browser default 440 or 5xx error pages are generated on the 404 page server. You can see Apache's default 404 page for reference.


Comments