Reputation: 49
I'm trying to get the file extension of uploaded image with
$ext = pathinfo($_FILES[$type]['name'], PATHINFO_EXTENSION);
it's working fine for the filenames having extension in it e.g image.png, pic.jpg etc
but when i remove .png/.jpg from the filename e.g image, pic
, it returns nothing.
Any idea how can i get the extension to be exact?
Upvotes: 1
Views: 56