Jump to content

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.
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
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]
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.