我在php中上传文件时得到了一个未定义的索引错误 [英] i got a undefined index error when file upload in php
本文介绍了我在php中上传文件时得到了一个未定义的索引错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我一次又一次地搜索,但找不到正确的答案。这是情况。我在同一个php文件中有多个表单,下面显示了代码。
i searched again and again but could not find the right answer. here is the situation. i got more than one forms in the same php file and below shows the code.
当我回显如下
echo count($_FILES["fileUploadPath"] );
它显示0作为计数和
注意:未定义索引:
C:\ wamp中的addProjectFileUploadPath ...
Notice: Undefined index: addProjectFileUploadPath in C:\wamp...
更新:probelm解决.....错误来自第三方jquery插件称为fileinput
updated: probelm solved..... error came due to 3rd party jquery plugin called "fileinput"
推荐答案
添加 enctype =multipart / form-data
到表格
这篇关于我在php中上传文件时得到了一个未定义的索引错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文