iwarlord Posted August 30, 2008 Share Posted August 30, 2008 I've got a file which uses $_SERVER["PHP_SELF"] to find it's own file name, but when I include this in another file it reads the one it's included in. I realize this it probably how it's meant to work, but is there any way of avoiding this and only reading it's own filename? Link to comment https://forums.phpfreaks.com/topic/122032-solved-_serverquotphp_selfquot-in-an-included-script/ Share on other sites More sharing options...
genericnumber1 Posted August 30, 2008 Share Posted August 30, 2008 use the constant __FILE__ Link to comment https://forums.phpfreaks.com/topic/122032-solved-_serverquotphp_selfquot-in-an-included-script/#findComment-629934 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.