apache - 浏览器下载 index.php 文件而不打开页面

标签 apache codeigniter ubuntu

我刚刚将一个工作的 codeigniter 目录结构复制到了一个新的 ubuntu EC2 实例。
我已经设置了 apache,并希望浏览器页面只显示出来,但没有!
浏览器会下载 codeigniter 的 index.php 文件。

为什么会这样?

所有文件都具有 ubuntu:ubuntu 的用户/组权限。它是否必须使用不正确的权限做某事?

最佳答案

我对ec2不是很熟悉,但听起来php没有被加载到apache中。试试 sudo a2enmod php5并重新启动apache。

关于apache - 浏览器下载 index.php 文件而不打开页面,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15050732/

相关文章:

php - 使用 CI 事件记录仅在 DATE 数据类型列中选择月份部分?

php - Codeigniter,php5, fatal error : Class 'Controller' not found

php - 如何在 Windows 计算机上使用 PHP 旋转 pdf 内容?

apache - mod_headers 模块不加载,尽管它在 httpd.conf 中启用

ruby-on-rails - 如何将 Ruby on Rails 网站预编译为生产模式?

php - zend_mm_heap 用标准 PHP 5.6 损坏 : locating the cause

php - CodeIgniter 模型中应该包含哪些内容?

ruby - Ruby 桌面环境

ubuntu - "Host key verification failed"时如何建立ssh key 对

ubuntu - 哪个包需要自动安装一个?