pathinfo

It returns information about a file path

Example

<?php
echo "<pre>";
print_r(pathinfo("test.ini"));
?>

Output

Array
(
[dirname] => .
[basename] => test.ini
[extension] => ini
[filename] => test
)