Home >Backend Development >PHP Tutorial >apache2.2.21 PHP 5.2.17配置有关问题

apache2.2.21 PHP 5.2.17配置有关问题

WBOY
WBOYOriginal
2016-06-13 10:09:48885browse

【求助】apache2.2.21 PHP 5.2.17配置问题
apache与php都安装好了,服务也已经启动了,也按照书上的配置了,,也修改了系统环境变量,在httpd.conf文件的最后添加了如下代码:

LoadModule php5_module "d:\php\php5apache2_2.dll"
AddType application/x-httpd-php .php
PHPIniDir "d:\php"

然后也把D:\php 目录下的php.ini-dist文件重命名为php.ini

但是在测试test.php文件时,测试文件内容如下
phpinfo();
?>

浏览器还是只打开了php文件,还如源文件一样,没有执行里边的内容。。。。、请问这是除了什么状况 非常感谢



------解决方案--------------------

LoadModule php5_module "c:/php/php5apache2.dll"
AddHandler application/x-httpd-php .php

# configure the path to php.ini
PHPIniDir "C:/php"


SetHandler application/x-httpd-php
 

Statement:
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
Previous article:请求来解答Next article:PHP链接excel sql分页有关问题