PHP find file extension


SUBMITTED BY: Guest

DATE: June 12, 2013, 2:05 p.m.

FORMAT: PHP

SIZE: 107 Bytes

HITS: 861

  1. <?php
  2. $file = '/path/to/file.php';
  3. $info = pathinfo($file);
  4. echo $info['extension'];
  5. ?>

comments powered by Disqus