找到C:WindowsSystem32inetsrvconfigapplicationHost.config,在directoryBrowse enabled="false"后面添加
<directoryBrowse enabled="false" /> <fastCgi> <application fullPath="D:php5php-cgi.exe" monitorChangesTo="C:Windowsphp.ini" activityTimeout="600" requestTimeout="600" instanceMaxRequests="10000"> <environmentVariables> <environmentVariable name="PHP_FCGI_MAX_REQUESTS" value="10000" /> <environmentVariable name="PHPRC" value="C:Windowsphp.ini" /> </environmentVariables> </application> </fastCgi>
其中<environmentVariable name="PHPRC" value="C:Windowsphp.ini" />是configuration file路径,
<location path="sitename"> <system.webServer> <asp> <limits bufferingLimit="2000000000" maxRequestEntityAllowed="2000000000" /> </asp> <webdav> <authoring maxAllowedXmlRequestLength="1073741824" /> </webdav> </system.webServer> </location>
然后,修改php.ini
cgi.force_redirect = 0
fastcgi.impersonate = 1
post_max_size = 256M