RogerInHawaii Posted June 28, 2007 Share Posted June 28, 2007 Is there a way, within a PHP script, to pick up the name of the web page that the script is being run on? Quote Link to comment Share on other sites More sharing options...
The Little Guy Posted June 28, 2007 Share Posted June 28, 2007 what do you mean by "name"? Quote Link to comment Share on other sites More sharing options...
pocobueno1388 Posted June 28, 2007 Share Posted June 28, 2007 $_SERVER['REQUEST_URI'] I think thats what your looking for... Quote Link to comment Share on other sites More sharing options...
pocobueno1388 Posted June 28, 2007 Share Posted June 28, 2007 You might be looking for $_SERVER['PHP_SELF'] ....you can try both of them and see which one you need. Here is a whole list of server variables that give you all types of info. http://php.net/reserved.variables Quote Link to comment Share on other sites More sharing options...
corbin Posted June 28, 2007 Share Posted June 28, 2007 You could always just do print_r($_SERVER) and see what you're looking for if all else fails. I have to do that every now and then lol. Quote Link to comment Share on other sites More sharing options...
RogerInHawaii Posted June 28, 2007 Author Share Posted June 28, 2007 Thank you, one and all. They look like good approaches. - Roger Quote Link to comment Share on other sites More sharing options...
pocobueno1388 Posted June 28, 2007 Share Posted June 28, 2007 Don't forget to mark the topic solved Quote Link to comment 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.