PHP » GoLang |
login |
register |
about
|
dirname(PHP 4, PHP 5, PHP 7) dirname — Returns a parent directory's path Description
string dirname
( string
$path
[, int $levels = 1
] )
Given a string containing the path of a file or directory, this function
will return the parent directory's path that is
Caution
dirname() is locale aware, so for it to see the correct directory name with multibyte character paths, the matching locale must be set using the setlocale() function. Parameters
Return Values
Returns the path of a parent directory. If there are no slashes in
Changelog
Examples
Example #1 dirname() example
<?php The above example will output something similar to: /etc / (or \ on Windows) . C:\ /usr See Also
|
more
Recently updated
more
Most requested
more
Last requests
|