IIS7 配置 PHP

WBOY
Release: 2016-06-23 14:34:48
Original
832 people have browsed it

1、修改php.ini

    主要修改有如下几处:

    将php.ini.recommend重命名为php.ini,然后记事本打开取消以下几个配置节点的注释,并将其值修改为如下:

      extension_dir = "./ext"

     fastcgi.impersonate =1

     extension=php_mysql.dll

    date.timezone = 'PRC'

 

2、打开IIS新建网站,指向php程序所在目录

    处理程序映射→添加模块映射

    请求路径:*.php

    模块:   FastCgiModule (此处是选择项,如果没有,请到打开或关闭windows功能中,检查IIS下的CGI功能是否打开,如果没打开,先打开它)

     可执行文件:{php install dir}\php-cgi.exe

     名称:随便起一个,比如叫PHPViaFastCGI

  点击确定,再点击是,添加成功。

新建测试页面serverinfo.php,内容为 

浏览器中浏览该页面,检查mysql扩展是否被正确加载(页面搜索mysql,能够看到下面这个即正确加载了),至此,配置成功。

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template