- function upload_software($fileName,$oldFile='')
- {
- $upload = new Upload();
- del_old_file($oldFile);
- if(!emptyempty($_FILES[$fileName]))
- {
- $upload->AllowExt='rar|zip|txt|exe|zip|doc|docx|ppt|pptx|xls|xlsx|mp3|mpg|mpeg|avi|rm|rmvb|wmv|wav|wma|bmp';
- $fileName = $upload->SaveFile($fileName);
- if(emptyempty($fileName))echo $upload->showError();
- return UPLOADPATH.$fileName;
- }
- }
看到了就明白了,上面$upload->AllowExt没有图片和pdf等格式。修改$upload->AllowExt参数即可