PHP Tutorial : Get file extension

With the next three lines of php code you will be able to get a file extension.

Tagged with: , , , , ,
Posted in Short PHP Functions
6 comments on “PHP Tutorial : Get file extension
  1. Jelle says:

    This works very well.

    Can be used to check files in a download script and reject certain file-types.

  2. admin says:

    Yup I agree! Thanks

  3. Juan says:

    what if there s a file called whatever.whatever.mp3?

  4. admin says:

    What would be the problem? no problem it will work with any file extension

  5. Maitane says:

    commenting usually isnt my thing, but ive spent an hour on the site, so thanks for the info

  6. admin says:

    cool, thank you very much! subscribe to feed too I keep it updated – at least I try.

Leave a Reply

Your email address will not be published. Required fields are marked *