PHP中flush()在iis下无效的解决方法

2015-05-08 16:48:29

技术资料 PHP IIS

flush在IIS FastCGI的默认设置下无效,解决方法如下:


修改IIS配置文件

IIS6

修改C:\Windows\System32\inetsrv\fcgiext.ini,增加ResponseBufferLimit=0

[PHP]

ExePath=C:\Program Files\PHP\php-cgi.exe

ResponseBufferLimit=0

IIS7

修改C:\Windows\System32\inetsrv\config\applicationHost.config,增加responseBufferLimit="0"

<handlers accessPolicy="Read, Script">

<add name="PHP_via_FastCGI" path="*.php" verb="*" modules="FastCgiModule" scriptProcessor="D:\PHP\php-cgi.exe" resourceType="Either" responseBufferLimit="0" />