最新回答 / 慕九州4459918
这个效率高些
function getExt($filename){ $pos = strripos($filename,"."); if(!$pos){ return "扩展名不存在!"; }else { return substr($filename, $pos + 1); } }
2020-06-30
最新回答 / 街长
call_user_func()方法是回调函数,function($username){echo "hello {$username}";}这部分是匿名函数,相当于function A($username){echo "hello".$username;}"king"是要传递的参数,传给$username;相当于是A(‘King’);
2019-03-16
已采纳回答 / _Jack_Han_
把第五行改成 $filearray = str.split($file);array(str.split($file))是一个二维数组,你打印出来看一看就知道了。
2018-12-30