POST请求,或者请求中提供的数据量超过容量限制

问题描述 投票:0回答:1

当我尝试将 excel 文件上传到数据库时,我在 000webhost 上遇到此问题。

这是我的测试站点的链接 Excel 表格测试站点

有一个名为

largedata.xlsx
的文件我正在尝试上传此文件。 这里

需要一些时间,但之后会显示错误消息

POST requests, or the amount of data provided in the request exceeds the capacity limit.

我对此进行了搜索,并且已经更新了

post_max_size
文件中的
upload_max_filesize
.htaccess
,您可以检查
info.php
了解此详细信息。但我仍然面临这个问题。

.htaccess

php_value post_max_size xxM
php_value upload_max_filesize xxM

xx 替换为您的值。

php excel .htaccess php-ini
1个回答
0
投票

当请求正文大于服务器配置允许的大小时,会发生 413 错误。以下是修复该问题的方法,具体取决于您的网络服务器:

Apache: Set the LimitRequestBody directive in either your httpd.conf file or a local .htaccess file. (https://stackoverflow.com/a/3719358/1688568)

Nginx: Set the client_max_body_size directive in nginx.conf (http://www.cyberciti.biz/faq/linux-unix-bsd-nginx-413-request-entity-too-large/)

IIS: Set the uploadreadaheadsize config setting (http://blogs.msdn.com/b/jiruss/archive/2007/04/13/http-413-request-entity-too-large-can-t-upload-large-files-using-iis6.aspx)
最新问题
© www.soinside.com 2019 - 2024. All rights reserved.