Sai Kiran Sripada
  • Blog
  • Projects
  • Blog
  • Projects

Get the file extension in PHP

Nov 24, 2015 · last updated on Dec 23, 2023

A simple function to get the extension of a file. Meet pathinfo().

<?php $extension = pathinfo($filename, PATHINFO_EXTENSION); ?>
« Always backup your database Include CSS or JavaScript in Moodle »
Did you like that post? You can suscribe to the RSS feed or follow @neatcoder on Twitter .
  • Sai Kiran Sripada
  • A software engineer with a strong interest in data structures, algorithms, and back-end development.
Links
  • contact
  • neatcoder
  • saikiransripada
  • saikiransripada
  • saikiransripada
  • Blog
  • Projects
© Sai Kiran Sripada (2015-2024)