The PHP pathinfo() function returns information about a file path.
Output
Array
(
[dirname] => /files
[basename] => test.txt
[extension] => txt
)
Syntax
pathinfo(path, options)
Parameters
Parameter | Description |
---|---|
path | Specifies the path to be checked (required) |
options | Specifies which array element to return:
|