How to get extension images file jquery.filer

浪尽此生 提交于 2020-01-06 05:40:06

问题


How to get extension file upload by jquery.filer and uploader 0.2

I want get extension php file uploader 0.2 you can see code on github https://github.com/CreativeDream/php-uploader

I'm tried to use this code

$path_parts = pathinfo($_FILES["files"]["name"]);
$extension = $path_parts['extension'];

or

$name = $_FILES["files"]["name"];
$ext = end((explode(".", $name)));

but result : "" blank value

and tried again echo $_FILES["files"] result is : "Array"

Please help to get extension file


回答1:


$ext = substr(strrchr(strtolower($_FILES["files"]["name"][0]), "."),1)


来源:https://stackoverflow.com/questions/32934787/how-to-get-extension-images-file-jquery-filer

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!