i want to recive the url but withogut the page name!
for example :
http://localhost/xxx/rrr/234.php
i want only :
http://localhost/xxx/rrr/
how do i do it?>
reciving the url withoguth the page name!
Moderator: General Moderators
-
Hurklefish
- Forum Newbie
- Posts: 7
- Joined: Sat Dec 20, 2003 4:03 pm
one idea..
well, you could use a function to split your url into an array (of course, I don't remember the function.. in asp, it's 'split'.. is it 'explode()' in php?)
using the / as the seperator, then loop through the elements of the array one less the the total number of elements, building a new string that doesn't include the final element, 234.php
There's probably a less cumbersome method, but I'll be darned if I can think of it off the top of my head.
using the / as the seperator, then loop through the elements of the array one less the the total number of elements, building a new string that doesn't include the final element, 234.php
There's probably a less cumbersome method, but I'll be darned if I can think of it off the top of my head.