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 字节的限制
基础教程推荐
- YouTube API v3 点赞视频,但计数器不增加 2022-01-01
- Cron Jobs 调用带有变量的 PHP 脚本 2022-01-01
- PHP PDO MySQL 查询 LIKE ->多个关键词 2021-01-01
- 如何替换eregi() 2022-01-01
- 学说 dbal querybuilder 作为准备好的语句 2022-01-01
- 有什么方法可以用编码 UTF-8 而不是 Unicode 返回 PHP`json_encode`? 2021-01-01
- 在PHP中根据W3C规范Unicode 2022-01-01
- PHP 类:全局变量作为类中的属性 2021-01-01
- 如何在 Laravel 中使用 React Router? 2022-01-01
- 如何在 Laravel 5.3 注册中添加动态下拉列表列? 2021-01-01
