Web服务器显示间$ P $的了PHP的文件内容,而不是它pting [英] Webserver shows content of php-files instead of interpreting it

查看:115
本文介绍了Web服务器显示间$ P $的了PHP的文件内容,而不是它pting的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近安装在我的树莓派的Apache2和MySQL,我也设置FTP这样我就可以修改我的档案在我的电脑,并直接上传到网络服务器。

I recently installed apache2 and Mysql on my RaspberryPi, I also setup FTP so I can edit my Files on my PC and upload them directly to the webserver.

如果我现在连接到我的服务器可见它的IP地址,我可以看到的index.html,但只要我尝试打开一个*。PHP文件就说明称文件,而不是相互preting的内容它。

If I now connect to my server vis it's IP-Address I can see the index.html, but as soon as I try to open a *.php file it shows the content of said file instead of interpreting it.

是否有常见的错误,可能使这种情况发生?

Are there any common mistakes that could make this happen?

感谢您的帮助。

推荐答案

这样的错误主要发生3原因

This kind of errors mainly happen 3 reason


  1. 您可能没有安装PHP

  2. 如果您已经安装了PHP,你有没有与Apache
  3. 配置
  4. 检查其打开PHP标记你的PHP文件< PHP 和结束PHP的标记>

  1. You may not be installed php
  2. if you have installed php, you have not configured with apache
  3. Check your php file having opening php tag <?php and closing php tag ?>

这篇关于Web服务器显示间$ P $的了PHP的文件内容,而不是它pting的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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