在Windows上安装PHP,MySQL和Apache的 [英] Installing PHP, MySql and Apache on windows

查看:119
本文介绍了在Windows上安装PHP,MySQL和Apache的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

它的我第一次用Apache,PHP和MySQL工作。我下载并安装这3个的最新的软件包现在我与Apache和index.html的工作检查。现在我更换了的index.html与一些PHP脚本来检查我的PHP工作与否。当再次打开HTML页面我直接看到PHP code。看来这是行不通的。以下是我的PHP code的样子。

Its my first time working with Apache,PHP,MySql. I downloaded and installed the latest package of these 3. Now I checked with apache and the index.html works. Now I replaced the index.html with some php script to check if my php works or not. When opened the html page again I see the php code directly. It seems it does not work. following is how my php code looks like.

<html>
<body>

<?php
echo "Hello World";
?>

</body>
</html>

当我打开我的index.php,我看到上面code本身。任何人都可以让我知道什么是错,我该如何解决?

when I open my index.php , I see the above code itself. Can anybody let me know whats wrong and how can i fix it?

推荐答案

检查Apache的httpd.conf文件中的一些注释掉code,看起来像这样

Check your apache httpd.conf file for some commented out code that looks like this

LoadModule php5_module libexec/apache2/libphp5.so

和进一步下跌的文件,这个...

and further down the file, this...

<IfModule php5_module>
    AddType application/x-httpd-php .php
    AddType application/x-httpd-php-source .phps
    <IfModule dir_module>
            DirectoryIndex index.html index.php
    </IfModule>
</IfModule>

这篇关于在Windows上安装PHP,MySQL和Apache的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆