开发者

Each time I view a php page on localhost, it downloads the page

I have altered the httpd.conf file good to my knowledge by adding index.php in the directory index,

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

But any .php file I load, it downloads it.

Any help would be appreciated.

Thanks开发者_JS百科 Jean


The browser is not the issue - it is something with your configuration. Where have you placed this code in your httpd.conf file? Is it nested within other (perhaps module-specific) code? Maybe you can provide more (or all) of your http.conf file, and anything relevant in apache's startup log.

If you're not familiar with configuring apache, you may want to consider using a distribution of LAMP/WAMP as those will work out of the box.

But there is definitely something wrong with your apache configuration. For one reason or another (in apache's config), your PHP is not being parsed. This could be because the PHP isn't installed properly, because you've put the code to enable it in the wrong spot where it isn't being invoked, because you need something more than that for your specific environment, or because you have something conflicting with the code.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜