内容简介:apache2.4配置php5.6
首先在Apache官网下载 https://www.apachelounge.com/download/

请确保你的电脑安装有了

若没有安装 请点击 vc_redist_x64/86.exe文件

下载好了 将其解压到自己想要文件夹中

打开conf/httpd.conf文件

这是端口 可根据自己需要进行修改
这是Apache服务访问PHP文件的目录

还有cgi-bin的位置

支持多个默认页

将Apache服务安装到Windows服务中 以管理员身份运行cmd

httpd -k install -n "apache24"
如需卸载服务
httpd -k uninstall -n "apache24"
然后启动Apache服务

浏览器输入 localhost 回车

接下来是配置PHP环境
从官网下载PHP http://windows.php.net/download#php-5.6

下载后将其解压到自己想要的目录 复制份php.ini-development,并改名为PHP.ini

打开Apache24\conf下httpd.conf 添加如下内容
# php5 support LoadModule php5_module "F:/devloper/php-5.6.30/php5apache2_4.dll" AddHandler application/x-httpd-php .php # configure the path to php.ini PHPIniDir "F:/devloper/php-5.6.30"
测试下 在Apache/htdocs目录下新建一文件 index.php 内容如下
<?php phpinfo(); ?>
打开浏览器访问 localhost/index.php

以上所述就是小编给大家介绍的《apache2.4配置php5.6》,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对 码农网 的支持!
猜你喜欢:- 6、如何获取配置中心的配置
- React降级配置及Ant Design配置
- vscode 配置eslint 开发vue的相关配置
- git commit 规范校验配置和版本发布配置
- hadoop地址配置、内存配置、守护进程设置、环境设置
- 在hibernate中配置事务级别与命名查询配置【原创】
本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。