Gonwee Posted April 4, 2006 Share Posted April 4, 2006 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. Quote Link to comment https://forums.phpfreaks.com/topic/6576-does-a-404-error-occur-when-a-script-tries-to-include-a-file-that-cant-be-found/ Share on other sites More sharing options...
shortj75 Posted April 4, 2006 Share Posted April 4, 2006 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 Quote Link to comment https://forums.phpfreaks.com/topic/6576-does-a-404-error-occur-when-a-script-tries-to-include-a-file-that-cant-be-found/#findComment-23863 Share on other sites More sharing options...
neylitalo Posted April 4, 2006 Share Posted April 4, 2006 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] Quote Link to comment https://forums.phpfreaks.com/topic/6576-does-a-404-error-occur-when-a-script-tries-to-include-a-file-that-cant-be-found/#findComment-23912 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.