Page 1 of 1

Trimming a URL portion

Posted: Tue Mar 22, 2011 3:36 am
by mahi130
Iam a php newbie.i have a url like
"http://localhost/cs/ "
I need to cut the "/cs/" portion from the above mentioned url.How can i do this?
Anyone please help.
Thanks.......

Re: Trimming a URL portion

Posted: Tue Mar 22, 2011 9:52 am
by pickle
What do you mean by "cut"?

Re: Trimming a URL portion

Posted: Tue Mar 22, 2011 12:19 pm
by John Cartwright
use $_SERVER['HTTP_HOST'] ?

Re: Trimming a URL portion

Posted: Wed Mar 23, 2011 3:14 am
by mahi130
Thanks for the reply..