View Full Version : Get the URL path (without filename at the end)?

10-24-2012, 12:12 PM
Does anyone know how to get the path without the file?

i.e. if the URL is : www.mydomain.com/folder/index.php

then return: www.mydomain.com/folder/


10-24-2012, 03:29 PM
You can use dirname() function to pull the file off of a url path as well as a filesystem path.
It doesn't appear documented as such, but it does work.