dirname

 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.