Laravel中的PostTooLargeException [英] PostTooLargeException in Laravel
问题描述
当我尝试上传大小超过2 MB的文件时,我收到了过大的异常消息,并且我已经尝试了所有类似增加php.ini文件中的post_max_size和max_upload_size的操作,但是我仍然得到了相同的结果错误.当我在validatepostsize.php文件中注释处理程序函数时,它显示令牌不匹配错误:
I am getting the post too large exception when i try to upload files which are more than 2 MB in size and I've already tried everything like increasing the post_max_size and max_upload_size in php.ini file but i am still getting the same error.When i comment the handler function in validatepostsize.php file it shows token mismatch error:
推荐答案
我认为您可以在php.ini
文件中检查以下参数,例如:
I think you can check the following parameters in your php.ini
file like:
upload_max_filesize = 40m
post_max_size = 50m
重新启动服务器后,例如( apache )
After restart your server like (apache)
希望这项工作对您有用!
Hope this work for you!
这篇关于Laravel中的PostTooLargeException的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!