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

apache2.2.21 PHP 5.2.17配置有关问题

WBOY
Release: 2016-06-13 13:48:46
Original
729 people have browsed it

【求助】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
 

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template