gpt4 book ai didi

php - 增加文件上传大小 Wordpress/IIS 7

转载 作者:可可西里 更新时间:2023-10-31 22:45:00 24 4
gpt4 key购买 nike

我正在尝试增加 Wordpress 博客中的文件上传大小,以允许管理员发布他的电子书和大型 PDF 文件。该站点托管在 GoDaddy/IIS 7 上。我尝试了以下操作但没有成功:网页配置: <configuration><system.webServer><security><requestFiltering><requestLimits maxAllowedContentLength="10000000"/></requestFiltering></security></system.webServer></configuration>

站点根目录下的 php.ini: upload_max_filesize = 64M

非常感谢任何建议。谢谢,肖恩

最佳答案

解决办法在这里:

第一步:

First, you need to edit your server’s PHP.ini file. This is found inyour PHP installation directory, e.g. c:\program files\php\php.ini andset the following values:

upload_max_filesize = 64M
post_max_size = 64M
max_execution_time = 300
max_input_time = 300

This allows PHP to handle files up to 64MB and allows PHP scripts torun up to 5 minutes before timing out.

第 2 步:

Lastly, IIS 7 has a default file upload limit of 30MB. Anything largerthan that will cause IIS to return a very unhelpful 404 status. Youcan read more about it athttp://www.iis.net/ConfigReference/system.webServer/security/requestFiltering/requestLimits

To override this, you need to change the web.config settings for(each) site. (The only catch here is that the limits are expected tobe in bytes instead of kilobytes.) The following is some copypastafrom the MSDN docs:

不要忘记回收您的应用程序池,这样 IIS 就会回收您的应用程序池PHP.ini 更改。

就是这样!

http://refactored.tumblr.com/post/4609761388/wordpress-iis7-uploads

关于php - 增加文件上传大小 Wordpress/IIS 7,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15103717/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com