How to get a path of url

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
johnhelen
Forum Commoner
Posts: 45
Joined: Mon Feb 19, 2007 9:17 pm

How to get a path of url

Post by johnhelen »

Hello

I have a url like this

http://www.myweb.com/stories/mystory.php?cls=3012

I will get full url if I use this:

$_SERVER['HTTP_REFERER'];

I want to get a path of this url like:

http://www.myweb.com/stories

How I can do this

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

Post by feyd »

Post Reply