Getting path components and file extensions : pathinfo « File Directory « PHP






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

1.pathinfo.php