rahuul Posted August 29, 2009 Share Posted August 29, 2009 hello friends nd seniors, i am developing a page in which i need to get the name of file through which I came to the current page.: for eg: I opened '2.php' via a link on '1.php' I want to fetch 1.php. is their any function pls help thanks Link to comment https://forums.phpfreaks.com/topic/172407-how-to-fetch-reffering-file-name/ Share on other sites More sharing options...
peranha Posted August 29, 2009 Share Posted August 29, 2009 $_SERVER['HTTP_REFERER'] Link to comment https://forums.phpfreaks.com/topic/172407-how-to-fetch-reffering-file-name/#findComment-909012 Share on other sites More sharing options...
rahuul Posted August 29, 2009 Author Share Posted August 29, 2009 $_SERVER['HTTP_REFERER'] i already tried this but it gives the root path not the last file name..... for eg: 'http://localhost/website-testing/' 1.php I want to fetch 1.php Link to comment https://forums.phpfreaks.com/topic/172407-how-to-fetch-reffering-file-name/#findComment-909016 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.