假设您已经在the article you linked to中执行了步骤1 - 9并将PHP文件解压缩到c:\php,那么使用cmd.exe命令提示符完成以下步骤:
首先,我们需要配置IIS Express并为PHP设置处理程序
cd "\Program Files\IIS Express"
appcmd set config -section:system.webServer/fastCgi /+"[fullPath='C:\PHP\php-cgi.exe',arguments='',maxInstances='4',idleTimeout='300',activityTimeout='30',requestTimeout='90',queueLength='1000',instanceMaxRequests='200',protocol='NamedPipe',flushNamedPipe='False',rapidFailsPerMinute='10']" /commit:apphost
appcmd set config -section:system.webServer/handlers /+"[name='PHP-FastCGI',path='*.php',modules='FastCgiModule',verb='*', scriptProcessor='c:\php\php-cgi.exe']" /commit:apphost假设您的PHP网站位于c:\MyPHPWeb,我们在IIS Express中创建一个侦听http://localhost:32701的网站:
appcmd add site /name:"MyPHPApp" /bindings:http/*:32701: /physicalPath:"c:\MyPHPWeb"接下来启动网站:
iisexpress.exe /site:MyPHPApp最后浏览到您的PHP页面:
http://localhost:32701/test.php