944,047 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Unsolved
  • Views: 90602
  • PHP RSS
Sep 20th, 2004
0

Get the name of the current php file

Expand Post »
I want to make include file with a function, which among other things creates a link to the page itself, with an querystring variable added, how can i get the name of the current php file thus avoiding to have it as a string constant that has to be changed for each different page the include file is included in ?

Regards

Martin Bratbo
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
bratbo is offline Offline
3 posts
since Sep 2004
Sep 21st, 2004
0

Re: Get the name of the current php file

Quote originally posted by bratbo ...
I want to make include file with a function, which among other things creates a link to the page itself, with an querystring variable added, how can i get the name of the current php file thus avoiding to have it as a string constant that has to be changed for each different page the include file is included in ?

Regards

Martin Bratbo
$PHP_SELF :cheesy:
Reputation Points: 13
Solved Threads: 2
Junior Poster
YoungCoder is offline Offline
193 posts
since Aug 2004
Sep 24th, 2004
0

Re: Get the name of the current php file

Or, if you (very wisely) do not have auto_globals enabled, then $_SERVER['PHP_SELF'].
Team Colleague
Reputation Points: 63
Solved Threads: 6
Supreme Evil Overlord
Roberdin is offline Offline
282 posts
since Feb 2003

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: probem with installing php engine?!!
Next Thread in PHP Forum Timeline: Populating a fields on a form base on a selected item from a droplist.





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC