简体   繁体   English

表格未传递数据,PHP

[英]Form not passing data, PHP

I'm working a small management application and it requires us to to be able to upload images that are being trademarked, but in short I'm having problems retrieving the data to process it, after some debugging I've figure out that the form isn't passing any data to the $_FILES superglobal, and I can't figure out why. 我正在使用一个小型管理应用程序,它要求我们能够上传已注册商标的图像,但是总之,在进行一些调试后,我在检索数据以处理它时遇到了问题,我发现该表格没有将任何数据传递给$_FILES超全局变量,我不知道为什么。 This is the relevant form code: 这是相关的表单代码:

<form 
   action="/contracts/entity/save_entity/trademark" 
   method="post" 
   enctype="multipart/form-data" 
   id="manage-entity-form"
>
   <input 
      type="hidden" 
      id="MAX_FILE_SIZE" 
      name="MAX_FILE_SIZE" 
      value="102400000" 
   />
   <label for="file" class="">
     <span class="ui-button-text">Image</span>
   </label>
   <input 
      type="file" 
      id="file" 
      class="ui-state-active" 
      name="data[Upload][]" 
   />
</form>

multipart / form-data编码不支持多维数组-请参见此线程: 如何使用PHP和CURL使用多维POSTFIELDS上传文件(multipart / form-data)?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM