在 cpanel 中使用 .htaccess 更改 php 版本无效
change php version using .htaccess in cpanel is not working
我正在尝试使用 htaccess 更改服务器中的 php 版本。我正在关注这个问题的答案 how to change php version in htaccess in server
但对我没有用。当我进入我的项目时,它正在下载一个文件。有人可以帮我解决这个问题吗?这是.htaccess bellow-
<IfModule mod_rewrite.c>
AddHandler application/x-httpd-php71 .php
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
最后,AddHandler application/x-httpd-php70 .php
对我有用。谢谢!
我正在尝试使用 htaccess 更改服务器中的 php 版本。我正在关注这个问题的答案 how to change php version in htaccess in server 但对我没有用。当我进入我的项目时,它正在下载一个文件。有人可以帮我解决这个问题吗?这是.htaccess bellow-
<IfModule mod_rewrite.c>
AddHandler application/x-httpd-php71 .php
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
最后,AddHandler application/x-httpd-php70 .php
对我有用。谢谢!