php explode file extension name giving null -
so, when upload files, want check file extension is:
$files = $_files['files']; $files_name = $files['name']; shows: `"img.jpg"'
$files_name_explode = end(explode('.', $files_name)); getting null.
what doing wrong?
thanks
use below code :
$path = $_files['files']['name']; $ext = pathinfo($path, pathinfo_extension); hope :)

Comments
Post a Comment