Jump to content

Archived

This topic is now archived and is closed to further replies.

Gonwee

Does a 404 error occur when a script tries to include a file that can't be found?

Recommended Posts

Does a 404 error happen if a script tries to include a file that doesn't exist. If it does how how do i find out about it.

I keep getting 404 error reports(i set my 404 page to email me) and i haven't tried viewing any page that doesn't exist(and i know no one visits my site)

And i don't know what page the 404 error is coming from, i've got the $_SERVER['HTTP_REFERER'] variable, but that doesn't seem to work.

Share this post


Link to post
Share on other sites
if you use the include() function with a page that doesnt exist nothing happen you wont get error 404 if you are getting that error it is because it cant find the main page now if you are useing frame or iframe and the page is missing then yes you will get the error 404 in the frame or i frame

Share this post


Link to post
Share on other sites
A 404 is thrown by the web server when a client (your browser) requests a file from the server that does not exist. When you're using include(), that's not a client request; rather, it's the server requesting a file. If you try to include() a file that doesn't exist, it'll throw a PHP warning.

[a href=\"http://www.php.net/manual/en/function.include.php\" target=\"_blank\"]http://www.php.net/manual/en/function.include.php[/a]

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.