PHP-windows下安装
下载
Apache下载地址:http://httpd.apache.org/download.cgi
PHP下载地址:http://php.net/downloads.php
解压
解压到安装路径下H:\64soft下
修改配置文件
-
apache的配置:
apache下 Apache24\conf\httpd.conf
Define SRVROOT "H:\64soft\Apache24" ServerRoot "H:\64soft\Apache24" #端口 Listen 1008
代码路径配置
DocumentRoot "I:\code\web\php" <Directory "I:\code\web\php">
-
PHP的配置:
-
apache下 Apache24\conf\httpd.conf
PHPIniDir "H:\64soft\php7.0.27" LoadModule php7_module "H:\64soft\php7.0.27\php7apache2_4.dll" AddType application/x-compress .Z AddType application/x-gzip .gz .tgz AddType application/x-httpd-php .php
-
PHP路径下 php7.0.27\php.ini
extension_dir = "H:\64soft\php7.0.27\ext"
-
验证安装
apache:在浏览器输入http://localhost:1008/
PHP:在代码路径下添加test.php,里面编辑:<?php phpinfo(); ?>
, 启动Apache, 在浏览器输入:localhost:1008/test.php
ฅ平平庸庸的普通人ฅ