i have a problem, i am using dirname($_SERVER['PHP_SELF']); to get a the url of the current page and i have ended up with this /clients/sherloc_media/install and im trying to use explode() to get just this /clients/sherloc_media i need this for 1 variable and then i need sherloc_media for another, i have been attempting this for the past few hours as the /clients/sherloc_media i am going to be using as the $root variable,
Somehow i have ended up with links like this http://localhost/clients/sherloc_media/operate/opertate/index.php
when its suposed to be http://localhost/clients/sherloc_media/opertate/index.php
any help would be great thanks, i dont have any code that ive used to get the error result as i have been deleting and starting again, you know the crack, cheers
One of many ways:
Or if you prefer explode: