string dirname ( string $path )
Given a string containing the path of a file or directory, this function will return the parent directory's path.
Returns the path of the parent directory. If there are no slashes in path, a dot ('.') is returned, indicating the current directory. Otherwise, the returned string is path with any trailing /component removed.