Windows 启用 IIS 并配置 PHP 环境

#### 材料: * PHP([到官网下载](https://windows.php.net/download)) #### 一、启用系统系统相关功能(已经启用的可以直接跳过) ##### **1\. 打开\`控制面板 > 程序 > 打开或关闭 Windwos 功能\`,然后稍等片刻。** ![file](/C/Users/Administrator/SiteResources/wp-content/uploads/2019/04/5cc7fb68b64dd.png) ![file](/C/Users/Administrator/SiteResources/wp-content/uploads/2019/04/5cc7fc9a4e0ef.png) ##### **2\. 勾选启用一些功能,然后等待三四分钟。** ![file](/C/Users/Administrator/SiteResources/wp-content/uploads/2019/04/5cc7fdd90a0de.png) #### 二、配置 iis 支持 php ##### **1\. 到 php 官网下载免安装版本,并解压。[快速通道](https://windows.php.net/download)** ![file](/C/Users/Administrator/SiteResources/wp-content/uploads/2019/04/5cc800a403afa.png) ![file](/C/Users/Administrator/SiteResources/wp-content/uploads/2019/04/5cc801474c1dd.png) 注:记住解压的路径 ##### **2\. 打开 iis** ![file](/C/Users/Administrator/SiteResources/wp-content/uploads/2019/04/5cc7ffc7ecf6c.png) ##### **3\. 添加\`处理程序映射\`** ![file](/C/Users/Administrator/SiteResources/wp-content/uploads/2019/04/5cc801db51e74.png) ![file](/C/Users/Administrator/SiteResources/wp-content/uploads/2019/04/5cc8036f22c11.png) ##### **4\. 配置刚才添加的\`FastCGI\`** ![file](/C/Users/Administrator/SiteResources/wp-content/uploads/2019/04/5cc803d4ad07b.png) ![file](/C/Users/Administrator/SiteResources/wp-content/uploads/2019/04/5cc8074515758.png) Name:PHP\_FCGI\_MAX_REQUESTS Value:10000 ##### **5\. 添加站点测试** \`\`\`php <?php phpinfo(); ?> \`\`\` ![file](/C/Users/Administrator/SiteResources/wp-content/uploads/2019/04/5cc808429d869.png) #### 三、可能遇到的问题 ##### **1\. 500.19 0x80070005 权限不足错误** ![file](/C/Users/Administrator/SiteResources/wp-content/uploads/2019/04/5cc809783cce4.png) 解决办法:给站点文件夹添加一个\`Everyone\`用户,设置完全控制。 ![file](/C/Users/Administrator/SiteResources/wp-content/uploads/2019/04/5cc80ad2f0554.png) ##### **2\. 不能隐藏默认文件** ![file](/C/Users/Administrator/SiteResources/wp-content/uploads/2019/04/5cc80b4b9d40e.png) 解决办法:默认文件设置为\`本地\` ![file](/C/Users/Administrator/SiteResources/wp-content/uploads/2019/04/5cc80be130e6d.png) ![file](/C/Users/Administrator/SiteResources/wp-content/uploads/2019/04/5cc80c1519c94.png)

更多文章

为什么视频压缩后不能在网页上播放 2020-04-13  11:00:25 怎么处理不合脚的鞋 2020-04-13  11:00:11 Windows 启用 IIS 并配置 PHP 环境 2020-04-13  10:59:57 Centos7 安装 tomcat 服务 2020-04-13  10:54:34 Python xlrd 模块获取 Excel 文件内容 2020-04-13  10:35:30 Centos7 yum 安装 Python3 2020-04-13  10:35:19