Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

dirname

dirname() is the name of the path to a file.

In the path /var/www/index.php, the dirname is /var/www.

dirname() provides the dirname from a path, based on the / separator. It has to be combined with basename() to get the name of the directory, without its path.

Documentation

See Also