gpt4 book ai didi

php - html/php,上传的文件未存储在 $_FILES 中

转载 作者:行者123 更新时间:2023-11-28 04:04:18 25 4
gpt4 key购买 nike

我有一个表单,用户可以在其中提交对象的描述(包括图像),并且有 JavaScript 为 +1 对象描述添加一组额外的输入。提交表单时,文件信息未存储在 $_FILES 中。

表单标签是<form id="order_form" name="order_form" method="post" action="#">

文件类型输入为<input type="file" name="order_image[]" /> .

print_r($_FILES);返回

array()

有没有人知道为什么会发生这种情况。我很乐意提供可能与此问题相关的任何其他信息。

最佳答案

您是否在表单标签中设置了正确的编码类型?

<form enctype="multipart/form-data" method="post" action=...>

关于php - html/php,上传的文件未存储在 $_FILES 中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6990148/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com