Home > Backend Development > PHP Tutorial > 上传文件 $_FILES 数组为空有关问题

上传文件 $_FILES 数组为空有关问题

WBOY
Release: 2016-06-13 13:36:26
Original
797 people have browsed it

上传文件 $_FILES 数组为空问题
在PHP编程中,目的想上传本地文件到服务器端,在调用$_FILES变量时,无法活得值,有什么解决办法么?
1 form表单中 enctype属性已给
2php.ini.配置文件中 file_uploads已开 
3临时根目录已开,默认
4最大上传限制没有突破
 if ($action == upload)
  {
  if(!empty($_FILES[upfile][name]))
  {echo $_FILES['upfile']['name']; }
  else{ exit;}
  }

《省去部分……………………》

  print("

");
  print("");
  print("");
  print("
\n");
以上是部分代码,触发upload无显示,并且用print_r打印该变量也没反映,用$_POST可以获得值,用$_upfile也可获得上传文件的值,但是不用$_FILES无法上传文件,求指教!!!!!!!!!

不知$_FILES会不会和java script的使用有关系?




------解决方案--------------------
文件夹没权限吧
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template