4WebHelp
 FAQ  •  Search  •  User Groups  •  Forum Admins  •  Smilies List  •  Statistics  •  Rules   •  Login   •  Register
Toggle Navigation Menu

 Is there a php function to find just the script name?
Post New TopicReply to Topic
View Previous Topic Print this topic View Next Topic
Author Message
chilling
Junior WebHelper
Junior WebHelper


Joined: 10 Jun 2005
Posts: 1

PostPosted: Fri Jun 10, 2005 8:51 pm (18 years, 10 months ago) Reply with QuoteBack to Top

Is there a php function to find just the script name?

For instance I am looking for some thing which will return just viewtopic.php from /phpbb/viewtopic.php

all of the following appear to return /phpbb/viewtopic.php rather than just viewtopic.php :
  • $_SERVER['SCRIPT_NAME']
  • $_SERVER['PHP_SELF']
  • $_SERVER['REQUEST_URI']


what am I missing?
OfflineView User's ProfileFind all posts by chillingSend Personal Message
jatonline
Junior WebHelper
Junior WebHelper


Joined: 21 Dec 2002
Posts: 5
Location: Gloucestershire, UK

PostPosted: Sat Jun 11, 2005 12:58 pm (18 years, 10 months ago) Reply with QuoteBack to Top

Try any of the following:

Code:
basename($_SERVER['SCRIPT_NAME'])
basename($_SERVER['PHP_SELF'])
basename($_SERVER['REQUEST_URI'])


HTH

________________________________
James Thomas (personal site)
Giving Up on the Ordinary (blog)
OfflineView User's ProfileFind all posts by jatonlineSend Personal MessageVisit Poster's Website
Display posts from previous:      
Post New TopicReply to Topic
View Previous Topic Print this topic View Next Topic


 Jump to:   




You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot edit your posts in this forum.
You cannot delete your posts in this forum.
You cannot vote in polls in this forum.


Page generation time: 0.220749 seconds :: 18 queries executed :: All Times are GMT
Powered by phpBB 2.0 © 2001, 2002 phpBB Group :: Based on an FI Theme