我正在上传一个70mb 的 ZIP 文件。也许调试可能会使事情不同步?当我在文件输入中没有文件时,我得到了发布数据,但是当我这样做时,发布数据是空的。
<form method="post" action="load_statements.php?action=load" id="form1" enctype="multipart/form-data">
我有字段(具有名称属性)和表单内的提交按钮。但是,当我尝试访问它们时,我得到:
Notice: /fiq_local/load_statements.php line 33 - Undefined index: statementType
Notice: /fiq_local/load_statements.php line 45 - Undefined index: year
Notice: /fiq_local/load_statements.php line 47 - Undefined index: idVar
Notice: /fiq_local/load_statements.php line 49 - Undefined index: attachment
它们都遵循相同的语法。这是一个:
$statementType = $_POST['statementType'];
看来上传需要很长时间,所以我猜这是问题所在。如何处理大文件上传并仍然获取帖子数据?
我在我的 php.ini 中设置了以下内容:
; Maximum allowed size for uploaded files.
upload_max_filesize = 1000M