timmy2 Posted August 2, 2007 Share Posted August 2, 2007 I'm trying to create a php 404 file however I dont know the command to echo the file you are trying to access I tried <?php echo $_SERVER['PHP_SELF']; ?> but that just echoed 404.php I'd really appreciate any help Quote Link to comment https://forums.phpfreaks.com/topic/63107-echo/ Share on other sites More sharing options...
timmy2 Posted August 2, 2007 Author Share Posted August 2, 2007 should I do this with javascript? :-\ Quote Link to comment https://forums.phpfreaks.com/topic/63107-echo/#findComment-314391 Share on other sites More sharing options...
EagleAmerican Posted August 2, 2007 Share Posted August 2, 2007 Try this: <?php echo $_SERVER['HTTP_REFERER']; ?> Quote Link to comment https://forums.phpfreaks.com/topic/63107-echo/#findComment-314393 Share on other sites More sharing options...
timmy2 Posted August 2, 2007 Author Share Posted August 2, 2007 that just give me this error Sorry the file you requested Notice: Undefined index: HTTP_REFERER in myfile on line 5 was not found Quote Link to comment https://forums.phpfreaks.com/topic/63107-echo/#findComment-314394 Share on other sites More sharing options...
EagleAmerican Posted August 2, 2007 Share Posted August 2, 2007 Hmm.. you might want to take a look at this: http://www.phpfreaks.com/tutorials/21/0.php Quote Link to comment https://forums.phpfreaks.com/topic/63107-echo/#findComment-314399 Share on other sites More sharing options...
timmy2 Posted August 2, 2007 Author Share Posted August 2, 2007 that's for redirecting pages when you use a new structure and does not have anything about getting the refer Quote Link to comment https://forums.phpfreaks.com/topic/63107-echo/#findComment-314403 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.