...

View Full Version : PHP: Fetching foldername from URL



phantom007
03-16-2008, 05:49 AM
Hi,

I came up with this problem last night.

I have a URL http://www.mysite.com

How do I fetch the folder name that was supplied in the URL.

For example:


http://www.mysite.com/xyz
or
http://mysite.com/myfolder
or
http://www.mysite.com/xxx


Please note that I can either use www or http://www or just http:// in my domain name but I need to fetch the folder name that was supplied in the URL.

PS:

I tried the following code, but it didnt revealed the foldername supplied


<?php
echo $_SERVER['HTTP_HOST'];
?>




Please help.


Thanx

abduraooft
03-16-2008, 11:12 AM
http://www.webune.com/forums/viewtopic-p-62.html, may help you!



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum