pathinfo.php : pathinfo « File Directory « PHP






pathinfo.php

 
<?php
   $pathinfo = pathinfo("data.txt");
   echo "Dir name: $pathinfo[dirname]<br />\n";
   echo "Base name: $pathinfo[basename] <br />\n";
   echo "Extension: $pathinfo[extension] <br />\n";
?>
  
  








Related examples in the same category

1.Getting path components and file extensions