//文件上传到uploads文件夹$path='uploads';//要上传的文件名已经给了变量$fileInfo['name']$uniName=$fileInfo['name'];$destination=$path.'/'.$uniName;$filenames1=scandir($path);if ($fileInfo['name']=foreach ($filenames1) { echo "<script language=\"JavaScript\">\r\n"; echo " alert(\"文件名已存在请重命名后重新上传\");\r\n"; echo " history.back();\r\n"; echo "</script>"; exit;}
- 2 回答
- 0 关注
- 1231 浏览
添加回答
举报
0/150
提交
取消