How to get the file extension of the form uploaded file in PHP? - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

How to get the file extension of the form uploaded file in PHP?

Damian99Damian99 USAPosts: 116Member

Can someone please explain how to get the file extension of the form uploaded file in PHP?

Tagged:

Comments

  • DavidMDavidM USAPosts: 342Member
    $filepath = $_FILES['image']['name'];
    $fileextension = pathinfo($filepath, PATHINFO_EXTENSION);
    
Sign In or Register to comment.