Posted By

chrisaiv on 12/28/09


Tagged

php pathinfo


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

BrianCoyDesign
lifewishes


PHP: Finding information on a file


 / Published in: PHP
 

Handy function that allows you get some data on a file

  1. $file_info = pathinfo( __FILE__ );
  2. echo $file_info['dirname'] . "<br />";
  3. echo $file_info['basename'] . "<br />";
  4. echo $file_info['filename'] . "<br />";
  5. echo $file_info['extension'] . "<br />";

Report this snippet  

You need to login to post a comment.