You are here: Re: Forcing a 404 error « All PHP « IT news, forums, messages
Re: Forcing a 404 error

Posted by Janwillem Borleffs on 10/18/05 17:31

jj wrote:
> Hi,
>
> I want to force a 404 error at certain times in my script, I have used this
> line of code in a windows environment with success. But recently I have
> moved over to Unix and this script only renders a blank screen without the
> actual error being shown. Can any one help? thanks.
>
> header("HTTP/1.1 404 Not Found");
>

When you mean "with success" that you where shown the fancy 404 error IE
page and you are faced with a white screen using another browser, then
this is correct.

When IE detects that the content of the error page is smaller than a
certain amount of bytes, it replaces the page. Other browsers, like
FireFox, don't do that.


JW

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация