【问题标题】:PHP code is not executed in Apache, rather the code itself is displayedPHP 代码不在 Apache 中执行,而是显示代码本身
【发布时间】:2017-01-12 19:35:23
【问题描述】:

我是 PHP 新手。为什么Apache只显示文件内容而不执行index.php

我在 ubuntu 14 的 apache2 子域上安装了 prosper202,使用 PHP 5.5.9-1ubuntu4.20 (cli)(构建时间:2016 年 10 月 3 日 13:00:37)和 php-fpm,但它只显示 @987654323 的内容@,它不会引导我进入设置过程。

出了什么问题以及如何运行index.php

【问题讨论】:

  • 你能检查一下everyhting是否配置正确吗?检查这个:stackoverflow.com/a/11595872/4921289
  • 安装PHP后是否重启了apache? sudo service apache2 restart
  • 感谢@Marc Scheib,我看到页面正在加载,但仍然存在配置问题(请参阅下面的答案)

标签: php ubuntu apache2


【解决方案1】:

是php的问题,我重装启用了,现在prosper202显示PHP写权限(一键升级需要),不可写。

我检查了安装的目录,它有以下内容: drwxr-xr-x 5 root root 4096 2015 年 7 月 14 日提供202

为什么会抱怨写权限?

谢谢!

【讨论】:

    猜你喜欢
    • 2021-07-02
    相关资源
    最近更新 更多