PHP » PYTHON |
login |
register |
about
|
import os os.path.dirname(path) dirname(PHP 4, PHP 5) dirname — Returns directory name component of path Description
string dirname
( string $path
)
Given a string containing a path to a file, this function will return the name of the directory. Parameters
Return ValuesReturns the name of the 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. Changelog
Examples
Example #1 dirname() example
<?php
Notes
Check the following change example:
<?php
See Also
|
more
Recently updated
more
Most requested
|