dirname

Example

 string dirname ( string $path ) 

Description

Given a string containing the path of a file or directory, this function will return the parent directory's path.

Return Values

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.