how do i extract the page name only from a url address?

Any questions involving matching text strings to patterns - the pattern is called a "regular expression."

Moderator: General Moderators

Post Reply
Antek_Ryu
Forum Commoner
Posts: 34
Joined: Tue Aug 09, 2005 10:55 am

how do i extract the page name only from a url address?

Post by Antek_Ryu »

Hi All

How can I extract the page name from the url, example I have done this

Code: Select all

$theuri = $_SERVER['REQUEST_URI'];

The result I get is /directoryA/index.php

All I want to do is get index.php




Kind Regards
Antek
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Antek_Ryu
Forum Commoner
Posts: 34
Joined: Tue Aug 09, 2005 10:55 am

Post by Antek_Ryu »

Thanks it worked!!!
Post Reply