从
http://www.php.net上下载PHP,再将其解压到c:php下;
将“php.ini-recommended”重命名为“php.ini”之后将其移动到C:WINDOWS;
将php4ts.dll移动到C:WINDOWSSystem32;
进入“控制面板”? “管理工具”(Administrative Tools);
双击“Internet信息服务”管理器(IIS Manager):
1)、点击“Web服务扩展”(Web Service Extensions)并选择添加一个新的Web服务扩展,如下图:

screen.width*0.5) {this.resized=true; this.width=screen.width*0.5;}" border=0>
2)、将路径添加到php4isapi.dll中:

screen.width*0.5) {this.resized=true; this.width=screen.width*0.5;}" border=0>
3)、点击设置扩展状态:

screen.width*0.5) {this.resized=true; this.width=screen.width*0.5;}" border=0>
4)、右击“缺省Web站点”(Default Web Site)后选择“属性”(Properties):

screen.width*0.5) {this.resized=true; this.width=screen.width*0.5;}" border=0>
5)、进入主目录标签(Home Directory),设置允许执行脚本和可执行程序:

screen.width*0.5) {this.resized=true; this.width=screen.width*0.5;}" border=0>
6)、点击“配置”选项(Configuration)?“添加”(Add):

screen.width*0.5) {this.resized=true; this.width=screen.width*0.5;}" border=0>
7)、正确地填写:Executable: browse to the php4isapi.dll and the Extension: .php;取消文件存在核实复选标记,只保留脚本引擎:

screen.width*0.5) {this.resized=true; this.width=screen.width*0.5;}" border=0>
8)、进入“文档”(Documents)标签,添加index.php并将其置顶;
9)、进入命令提示符:开始 运行 cmd

screen.width*0.5) {this.resized=true; this.width=screen.width*0.5;}" border=0>
10)、在命令提示符中键入:iisrestart

screen.width*0.5) {this.resized=true; this.width=screen.width*0.5;}" border=0>
11)、NT安全性:在wwwroot和php目录中添加可阅读、执行的IUSR_YourMachineName;
12)、为了检测PHP是否正在运行,编写一个名为phpinfo.php,内容为如下简PHP脚本:的文件,再将其复制到wwwroot目录中。
尝试从浏览器中调用该文件就可以观察PHP是否生效。
如果PHP还没有运行,试图从
http://www.php.net/downloads.php运行Windows Installer,再从头重复所有步骤。
声明:中国IT运维网登载此文出于传递更多信息之目的,并不意味着本站赞同其观点或证实其描述。其原创性以及文中陈述
文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或
承诺,请网友及读者仅作参考,并请自行核实相关内容。如原作者不同意在本网站刊登内容,请及时通知本站予以删除。凡本网站注明"来源:中国IT运维网"的作品,在授权范围内使用时,请保留注明"来源:中国IT运维网"。