1.我的 apache 配置是成功的,我运行http://localhost/是成功的显示 It works! 
2.我的环境变量中的Path路径加了一个我的php所在路径如:.....D:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies\;D:\PHP
3.我在D:\Program Files\Apache Software Foundation\Apache2.2\conf路径下的httpd.conf文件中加了3行语句如下:
#LoadModule usertrack_module modules/mod_usertrack.so
#LoadModule version_module modules/mod_version.so
#LoadModule vhost_alias_module modules/mod_vhost_alias.so
LoadModule php5_module "D:\PHP\php5apache2_2.dll" 
AddType application/x-httpd-php. php 
PHPIniDir "D:\PHP" 

<IfModule !mpm_netware_module>
<IfModule !mpm_winnt_module>
4.我写了一个php文件如:<?php 
phpinfo();
?>并保存为info.php文件,并把它存放在D:\Program Files\Apache Software Foundation\Apache2.2\htdocs文件下。
5.我打开ie,在地址栏输入http://localhost/info.php,但显示不出任何效果,只是提示我是不是保存此文件,晕死了,怎么办??

解决方案 »

  1.   

    AddType application/x-httpd-php. php 
    =>
    AddType application/x-httpd-php .php 
      

  2.   


    AddType
    不是放在那里吧,放的位置不对
    应该放在AddType模块里吧。
      

  3.   

    我现在把AddType application/x-httpd-php .php 
    放到这个位置了:(可是运行结果还是只让我保存文件,不显示任何效果)
        #
        #AddType application/x-gzip .tgz
        #
        # AddEncoding allows you to have certain browsers uncompress
        # information on the fly. Note: Not all browsers support this.
        #
        #AddEncoding x-compress .Z
        #AddEncoding x-gzip .gz .tgz
        #
        # If the AddEncoding directives above are commented-out, then you
        # probably should define those extensions to indicate media types:
        #
        AddType application/x-compress .Z
        AddType application/x-gzip .gz .tgz
        AddType application/x-httpd-php .php    #
        # AddHandler allows you to map certain file extensions to "handlers":
        # actions unrelated to filetype. These can be either built into the server
        # or added with the Action directive (see below)
        #
        # To use CGI scripts outside of ScriptAliased directories:
        # (You will also need to add "ExecCGI" to the "Options" directive.)
        #
        #AddHandler cgi-script .cgi    # For type maps (negotiated resources):
        #AddHandler type-map var    #
        # Filters allow you to process content before it is sent to the client.
        #
        # To parse .shtml files for server-side includes (SSI):
        # (You will also need to add "Includes" to the "Options" directive.)
        #
        #AddType text/html .shtml
        #AddOutputFilter INCLUDES .shtml
    </IfModule>
      

  4.   

    LoadModule php5_module D:/php/php5apache2.dll
    你apche服务可以启动么?
      

  5.   

    这样配置有重启apche服务可以启动吗?