Getting path components and file extensions : pathinfo « File Directory « PHP
- PHP
- File Directory
- pathinfo
Getting path components and file extensions
<?php
$info = pathinfo('/usr/local/php/php.ini');
echo $info['dirname'];
echo $info['basename'];
echo $info['extension'];
?>
Related examples in the same category