php - 在 .htaccess 中更改 PHP 版本后出现内部服务器错误
问题描述
我正在开发 laravel 5.6 版。我的服务器的应用程序版本如下:
阿帕奇:阿帕奇/2.2.27
PHP: 5.4.27
MySQL:5.5.59
我无权在服务器中升级 PHP 版本。因此,我决定将这行代码添加到 public_html 文件夹内的 .htaccess 文件中。
AddHandler application/x-httpd-php70 .php
所以我的 .htaccess 文件看起来像这样
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews -Indexes
</IfModule>
RewriteEngine On
AddHandler application/x-httpd-php70 .php
# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} (.+)/$
RewriteRule ^ %1 [L,R=301]
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
但它没有升级 PHP 版本,而是给了我“500 Internal Server Error”页面并下载了一个名为“download”的文件。我能做些什么来处理这个问题?谢谢你。
解决方案
推荐阅读
- typescript - 将字符串缩小为对象的键
- tensorflow - 从 BigQuery ML 在 SavedModel 中进行预测
- awk - 打印带有列号的文件
- python - 在缩放目标和许多其他变量之后,同时预测如何对目标变量进行缩放以获得实际预测值
- python - 如何在不重复的情况下将 csv 文件中的新特定单元格添加到另一个文件中
- python - 指定 padx 或 pady 的位置?
- javascript - 为什么 b 是 10 而 var [b=10] = [undefined]?
- javascript - 仅使用静态文件加载页面的特定部分
- arrays - 为什么随机字符串生成器只从我的数组中打印一个字符串?
- python - 当我在 python 烧瓶中使用 config.json 文件中的用户名时,我能够创建会话,但是当我从数据库中导入名称时,我没有这样做