- 时间:2022-11-26 15:54 编辑: 来源: 阅读:
- 扫一扫,手机访问
摘要:在IIS 7中配置PHP运行环境简单步骤[图文教程]
安装 IIS 7.0
打开[b]Control Panel\Programs\Programs and Features\Turn Windows features on or off[/b], 在打开的对话框中勾选上这两个选项:
[img]http://files.jb51.net/file_images/article/201106/2011061900114748.jpg[/img]
单击OK等待片刻, IIS就安装完成了.
安装 PHP 5.2.6
1. 下载: [url=http://windows.php.net/downloads/releases/archives/php-5.2.6-Win32.zip]PHP 5.2.6[/url] ; 其它版本的 PHP [url=http://windows.php.net/downloads/releases/archives/]下载[/url].
2. 将压缩包解压, 放到一个目录中, 比如 D:\php
3. 将 php.ini-dist 复制到 C:\Windows 目录下并改名为 php.ini
4. 复制 php5ts.dll 和 libmysql.dll 到 C:\Windows\System32 中
配置 IIS
1. 添加 ISAPI 筛选器 (ISAPI Filters)
[img]http://files.jb51.net/file_images/article/201106/2011061900114749.jpg[/img]
[img]http://files.jb51.net/file_images/article/201106/2011061900114750.jpg[/img]
2. 配置处理程序映射 (Handler Mappings)
[img]http://files.jb51.net/file_images/article/201106/2011061900114751.jpg[/img]
测试
新建一个文本文件, 输入 <?php phpinfo(); ?> 保存为 php 文件, 存放在 Default Web Site 的文件目录( C:\inetpub\wwwroot )下, 在浏览器输入 [url=http://localhost/test.php]http://localhost/test.php[/url] 即可查看部署的 PHP 信息.
[img]http://files.jb51.net/file_images/article/201106/2011061900114752.png[/img]