PHP Warning: POST Content-Length of 8978294 bytes exceeds the limit of 8388608 bytes in Unknown on line 0(PHP 警告:8978294 字节的 POST 内容长度超过第 0 行未知中 8388608 字节的限制)
问题描述
在我的 XAMPP 本地开发环境中尝试在 WordPress 上上传导入时出现此错误:
I am getting this error when trying to upload an import on WordPress on my XAMPP local dev environment:
警告:8978294 字节的 POST 内容长度超出第 0 行 Unknown 中 8388608 字节的限制
Warning: POST Content-Length of 8978294 bytes exceeds the limit of 8388608 bytes in Unknown on line 0
我将 upload_max_filesize 从 2M 更改为 1000M,但这似乎没有任何作用.
I changed the upload_max_filesize from 2M to 1000M, but that didn't seem to do anything.
有什么想法吗?
推荐答案
8388608 字节为 8M,PHP 中的默认限制.将 php.ini 中的 post_max_size 更新为更大的值.
8388608 bytes is 8M, the default limit in PHP. Update your post_max_size in php.ini to a larger value.
upload_max_filesize 设置用户可以上传的最大文件大小,同时post_max_size 设置表单中可以通过 POST 发送的最大数据量.
upload_max_filesize sets the max file size that a user can upload while
post_max_size sets the maximum amount of data that can be sent via a POST in a form.
所以你可以将 upload_max_filesize 设置为 1 兆,这意味着用户可以上传的最大单个文件是 1 兆字节,但如果 post_max_size 可以一次上传 5 个 设置为 5.
So you can set upload_max_filesize to 1 meg, which will mean that the biggest single file a user can upload is 1 megabyte, but they could upload 5 of them at once if the post_max_size was set to 5.
更改将在服务器重启后生效.
Changes will take effect after a restart of the server.
这篇关于PHP 警告:8978294 字节的 POST 内容长度超过第 0 行未知中 8388608 字节的限制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:PHP 警告:8978294 字节的 POST 内容长度超过第 0 行未知中 8388608 字节的限制
基础教程推荐
- PHPUnit 的 Selenium 2 文档到底在哪里? 2022-01-01
- 使用 scandir() 在目录中查找文件夹 (PHP) 2022-01-01
- Web 服务器如何处理请求? 2021-01-01
- 如何在数学上评估像“2-1"这样的字符串?产生“1"? 2022-01-01
- php中的foreach复选框POST 2021-01-01
- 主题化 Drupal 7 的 Ubercart “/cart"页 2021-01-01
- php 7.4 在写入变量中的 Twig 问题 2022-01-01
- Yii2 - 在运行时设置邮件传输参数 2022-01-01
- 将变量从树枝传递给 js 2022-01-01
- php中的PDF导出 2022-01-01
