localhost/phpmyadmin/返回php代码 [英] Localhost/phpmyadmin/ returns php code

查看:29
本文介绍了localhost/phpmyadmin/返回php代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

但是在将httpd.conf"目录从index.html -> index.php 我得到了这个:

But however after changing the "httpd.conf" directory from index.html -> index.php I got this:

http://i.imgur.com/L291njR.png

然后我尝试使用 XAMPP,甚至在那之后我也得到了那个屏幕.有人能告诉我我可能做错了什么吗?

Then I tried using XAMPP and even after that I've gotten that screen. Could someone tell me what I might be doing wrong?

计算机操作系统:Windows XP

Computer OS: Windows XP

全屏转储:http://pastebin.com/Zbbxvxib

推荐答案

您的问题是(如评论中所建议的)Apache 不知道如何"运行 php,所以它只是给你原始的 php 文件.如果你没有安装PHP,你需要安装PHP,否则,如果你已经安装了PHP,则需要配置apache才能使用它.

Your problem is (as suggested in the comments) Apache has no idea "how" to run php, so it is just giving you the raw php files. You need to install PHP if you haven't, otherwise, if you have installed php you need to configure apache to use it.

去谷歌一下吧,那里有大量的资源来解释如何去做.

Go ahead and google it, there are a ton of resources out there explaining how to do it.

要寻找的好东西是 WAMP 堆栈.代表 Windows、Apache、MySQL &PHP.有很多地方会向您展示如何安装这些单独的组件.

A good thing to look for is the WAMP stack. Which stands for Windows, Apache, MySQL & PHP. There are many places showing you how to install each of these individual components.

httpd.conf 文件需要修改以包含 PHP.

The httpd.conf file needs to be modified to include PHP.

在所有 LoadModule 语句之后添加以下行:

Add the following line after all of the LoadModule statements:

LoadModule php5_module "[PathToPHP]/php5apache2_2.dll" 

搜索 AddType,并在最后一行 AddType 之后添加以下内容:

Search for AddType, and add the following after the last AddType line:

AddType application/x-httpd-php .php 

将 PHP 位置添加到 httpd.conf 文件的末尾.例如,在文件末尾添加以下内容:

Add the PHP location to the end of the httpd.conf file. For example, at the end of the file, add the following:

PHPIniDir "[PathToPHP]"

这篇关于localhost/phpmyadmin/返回php代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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