PHP安装

作者: coder_hong | 来源:发表于2017-02-04 23:52 被阅读71次

下载php.msi文件

Paste_Image.png

点击安装

Paste_Image.png

接受条款

Paste_Image.png

选择apache安装的路径

Paste_Image.png

希望安装的web,我们这里选择apache

Paste_Image.png

选择apache配置目录(含有httpd.conf等文件的目录)

Paste_Image.png

选择需要安装的组件

确认一下,开始Install

Paste_Image.png

正在安装

Paste_Image.png

安装完成

Paste_Image.png

配置PHP和Apache
a. PHP方面:由于在2-f中已经配置了Extensions中的Mysql,所以没有什么需要修改的。
b. Apache方面:(修改Apache目录中的httpd.conf文件)

i. 修改LoadModule:
      LoadModule php5_module "php5apache2_2.dll
      --> LoadModule php5_module "C:\Program Files (x86)\PHP\php5apache2_2.dll"
      PHPIniDir ""
      --> #PHPIniDir ""

iv. 修改DirectoryIndex:DirectoryIndex index.html --> DirectoryIndex index.html index.php

vi. 保存httpd.conf

  1. 测试PHP安装
      a. 在3-b-i中的目录E:/web下建立index.php文件
<?php
echo phpinfo(); 
;?>

b. 重启Apache http服务器
  c. 浏览器中输入地址http://localhost/index.php

结果:

Paste_Image.png

大功告成!!!!

相关文章

网友评论

      本文标题:PHP安装

      本文链接:https://www.haomeiwen.com/subject/qmmsittx.html