FAQ
•
Search
•
User Groups
•
Forum Admins
•
Smilies List
•
Statistics
•
Rules
•
Login
•
Register
H
ome
FAQs
L
inks
N
ews
Online Tools
phpBB
Scripts
T
utorials
A
bout us
C
ontact us
Contribute
Credits
Link to us
Is there a php function to find just the script name?
Forum Index
»
Server-Side Coding
Author
Message
chilling
Junior WebHelper
Joined: 10 Jun 2005
Posts: 1
Posted: Fri Jun 10, 2005 8:51 pm (18 years, 10 months ago)
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?
jatonline
Junior WebHelper
Joined: 21 Dec 2002
Posts: 5
Location: Gloucestershire, UK
Posted: Sat Jun 11, 2005 12:58 pm (18 years, 10 months ago)
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)
Display posts from previous:
All Posts
1 Day
7 Days
2 Weeks
1 Month
3 Months
6 Months
1 Year
Oldest First
Newest First
Forum Index
»
Server-Side Coding
Jump to:
Select a Forum
» 4WebHelp
Announcements
Our Site: Feedback & Questions
» General
Chit Chat
Freedom2Surf
Advertisements
» Support
General
Website Reviews
Client-Side Coding
Server-Side Coding
Databases
Web Servers
Hosting & Domain Names
Graphics & Flash
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.125561 seconds :: 18 queries executed :: All Times are GMT
Powered by
phpBB
2.0 © 2001, 2002 phpBB Group :: Based on an FI Theme