Syntax
| string dirname ( string $path ); |
Definition and Usage
Given a string containing a path to a file, this function will return the name of the directory.
Paramters
| Parameter | Description |
|---|---|
| path | A file path. |
Return Value
Returns the base name of the given path.
Example
Following is the usage of this function:
<?php |
This will produce following result:
dirname is /home/httpd/html |