【问题标题】:500 Internal Error for PHP codeigniterPHP codeigniter 的 500 内部错误
【发布时间】:2016-05-10 22:38:24
【问题描述】:

我是 php codeigniter 的新手,我需要上传 100 mb 大小的文件。所以从互联网上我找到了编辑我的 php.ini 文件的方法。但是在 codeigniter 中,php.ini 文件不适用于子文件夹。我需要在任何地方使用它,所以我写了超级用户访问 .htaccess 文件,但是我收到 500 Inter server error。

RewriteEngine on RewriteBase / RewriteCond $1 !^(index.php|resources|robots.txt) RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php?/$1 [L] suPHP_ConfigPath /home/edukeepi/public_html/php.ini

为什么会出现这个错误?

【问题讨论】:

  • 你的错误日志里写了什么?
  • 检查是否加载了mod_suphp.c apache模块。
  • 我该怎么办?您可以提供上述代码的代码示例还是可以编辑我的代码? @Tpojka

标签: php apache .htaccess codeigniter mod-rewrite


【解决方案1】:

请尝试在 ./resources/ 文件夹中上传。在您的 .htaccess 中,您允许“资源”文件夹写入文件(即上传)

【讨论】:

    猜你喜欢
    • 2017-04-01
    • 2011-06-09
    • 2011-10-04
    • 2012-04-25
    • 1970-01-01
    • 1970-01-01
    • 2012-12-19
    • 2013-12-03
    • 2018-02-22
    相关资源
    最近更新 更多