这看起来可能是个愚蠢的问题,但事实并非如此
我正在使用以下JS
jquery 1.11.2、jquery UI 1.11.2、bootstrap 3、input_file、inputmask、iCheck和jquery Validate
所有当前版本,除了我仍在使用1.11.2的jquery。
所有这些都很好,没有任何错误,我的问题是只有一个输入字段
<form name="forms1"
method="post"
class="form-horizontal"
id="forms1"
action="check.php"
enctype="multipart/form-data"
accept-charset="utf-8"
role="form">
[... About 16 input field and selects...]
// At the end just before the submit btn I have this...
<div class="form-group">
<label for="images">Would you like to add an image?</label>
<input name="images" id="images" type="file" class="file form-control"
data-show-upload="false"
data-show-caption="true"
size="2000">
<small class="alert-danger">
We only accept this type of images: .gif, .png, .jpeg, .jpg
</small>
</div>
</form>
因此,当用户提交表单时,除了输入文件外,所有内容都会得到相应的验证,因为这只是一个选项,不是必需的,如果用户确实上传了一个文件,它将被单独检查是否所有内容都正确,它将添加到他们的"应用程序"中,但问题是,特定的输入不会像其他输入一样发送/发布,空或不空是不存在的,但如果我添加随机输入类型的文本或任何其他文件,它确实会被发送。。。这个表格没有什么特别的,和其他表格一样。
关于为什么不能发送特定输入,有什么想法吗?
文件未在$_POST
:中发送
print_r($_FILES);
POST方法上传