Serv00主机如何修改PHP版本
问题介绍
在Serv00空间里,系统PHP版本通常较高,比如现在已经支持到8.4。
如果有些程序与新版本PHP不兼容,比如Wordpress 6.7.1就提示了如下错误:
fatal error: array and string offset access syntax with curly braces is no longer supported in /usr/home/cn5i99/domains/www.955800.xyz/public_html/index.php on line 2
你可以按照以下操作来降低PHP版本:
第一步,进入后台面板
点击进入domains–域名文件下,添加一个文档:.htaccess
点击 –New empty file,

第二步,右击文档 .htaccess编辑
依次点击:View/Edit --Choose other–Text Editor
然后将代码放入文件中:AddType application/x-httpd-php74 .php

当然,也可以根据你的需求向其中添加以下其中一行:
AddType application/x-httpd-php56 .php
AddType application/x-httpd-php70 .php
AddType application/x-httpd-php71 .php
AddType application/x-httpd-php72 .php
AddType application/x-httpd-php73 .php
AddType application/x-httpd-php74 .php
AddType application/x-httpd-php80 .php
AddType application/x-httpd-php81 .php
AddType application/x-httpd-php82 .php
AddType application/x-httpd-php83 .php
第三步,点击保存,返回即可
查看PHP版本号,已经降低成功。

阅读剩余
免责声明:
链接:https://www.955800.xyz/1623.html
资源来源于网络,版权归原作者所有,如有侵权请联系删除!仅供个人学习交流使用,请下载后24小时内删除。不得将上述内容用于商业或者非法用途,否则产生的一切后果自行承担!
THE END