Question and answer is powered by AnsPress.io
How to check upload image file extension in PHP? When I choose image and upload it, before upload image file into MySQl database check image file extension. I need help
Check upload file extension in PHP programming language before upload image use this code.
Example code:
<?php $fileUpload=$_FILES["file"]["name"]; $extention=pathinfo($fileUpload,PATHINFO_EXTENSION); echo $extention; ?>