联系官方销售客服

1835022288

028-61286886

POSCMS 版主:POSCMS负责人
年的版本今天升级服务器环境为结果报错实在找不到原因求指教
类型:POSCMS 更新时间:2020-06-22 11:16:52 服务器 版本 升级

2018年的版本3.2.0,今天升级服务器环境为php7.4,mysql8.0,结果报错。


实在找不到原因,求指教。

A PHP Error was encountered

Severity: 8192

Message: Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)`

Filename: libraries/Template.php

Line Number: 1991

Backtrace:

File: D:\www\cnauto\diy\branch\fqb\D_Common.php
Line: 605
Function: library

File: D:\www\cnauto\diy\branch\fqb\D_Common.php
Line: 46
Function: _init_variable

File: D:\www\cnauto\diy\dayrui\controllers\admin\Home.php
Line: 9
Function: __construct

File: D:\www\cnauto\diy\Init.php
Line: 63
Function: require

File: D:\www\cnauto\index.php
Line: 49
Function: require

File: D:\www\cnauto\gotomy_admin.php
Line: 8
Function: require

A PHP Error was encountered

Severity: 8192

Message: Array and string offset access syntax with curly braces is deprecated

Filename: libraries/Dip.php

Line Number: 84

Backtrace:

File: D:\www\cnauto\diy\dayrui\controllers\admin\Home.php
Line: 216
Function: library

File: D:\www\cnauto\diy\Init.php
Line: 63
Function: require

File: D:\www\cnauto\index.php
Line: 49
Function: require

File: D:\www\cnauto\gotomy_admin.php
Line: 8
Function: require

A PHP Error was encountered

Severity: 8192

Message: Array and string offset access syntax with curly braces is deprecated

Filename: libraries/Dip.php

Line Number: 84

Backtrace:

File: D:\www\cnauto\diy\dayrui\controllers\admin\Home.php
Line: 216
Function: library

File: D:\www\cnauto\diy\Init.php
Line: 63
Function: require

File: D:\www\cnauto\index.php
Line: 49
Function: require

File: D:\www\cnauto\gotomy_admin.php
Line: 8
Function: require

A PHP Error was encountered

Severity: 8192

Message: Array and string offset access syntax with curly braces is deprecated

Filename: libraries/Dip.php

Line Number: 84

Backtrace:

File: D:\www\cnauto\diy\dayrui\controllers\admin\Home.php
Line: 216
Function: library

File: D:\www\cnauto\diy\Init.php
Line: 63
Function: require

File: D:\www\cnauto\index.php
Line: 49
Function: require

File: D:\www\cnauto\gotomy_admin.php
Line: 8
Function: require

A PHP Error was encountered

Severity: 8192

Message: Array and string offset access syntax with curly braces is deprecated

Filename: libraries/Dip.php

Line Number: 84

Backtrace:

File: D:\www\cnauto\diy\dayrui\controllers\admin\Home.php
Line: 216
Function: library

File: D:\www\cnauto\diy\Init.php
Line: 63
Function: require

File: D:\www\cnauto\index.php
Line: 49
Function: require

File: D:\www\cnauto\gotomy_admin.php
Line: 8
Function: require

A PHP Error was encountered

Severity: 8192

Message: Array and string offset access syntax with curly braces is deprecated

Filename: libraries/Dip.php

Line Number: 85

Backtrace:

File: D:\www\cnauto\diy\dayrui\controllers\admin\Home.php
Line: 216
Function: library

File: D:\www\cnauto\diy\Init.php
Line: 63
Function: require

File: D:\www\cnauto\index.php
Line: 49
Function: require

File: D:\www\cnauto\gotomy_admin.php
Line: 8
Function: require

A PHP Error was encountered

Severity: 8192

Message: Array and string offset access syntax with curly braces is deprecated

Filename: libraries/Dip.php

Line Number: 85

Backtrace:

File: D:\www\cnauto\diy\dayrui\controllers\admin\Home.php
Line: 216
Function: library

File: D:\www\cnauto\diy\Init.php
Line: 63
Function: require

File: D:\www\cnauto\index.php
Line: 49
Function: require

File: D:\www\cnauto\gotomy_admin.php
Line: 8
Function: require

A PHP Error was encountered

Severity: 8192

Message: Array and string offset access syntax with curly braces is deprecated

Filename: libraries/Dip.php

Line Number: 85

Backtrace:

File: D:\www\cnauto\diy\dayrui\controllers\admin\Home.php
Line: 216
Function: library

File: D:\www\cnauto\diy\Init.php
Line: 63
Function: require

File: D:\www\cnauto\index.php
Line: 49
Function: require

File: D:\www\cnauto\gotomy_admin.php
Line: 8
Function: require

A PHP Error was encountered

Severity: 8192

Message: Array and string offset access syntax with curly braces is deprecated

Filename: libraries/Dip.php

Line Number: 86

Backtrace:

File: D:\www\cnauto\diy\dayrui\controllers\admin\Home.php
Line: 216
Function: library

File: D:\www\cnauto\diy\Init.php
Line: 63
Function: require

File: D:\www\cnauto\index.php
Line: 49
Function: require

File: D:\www\cnauto\gotomy_admin.php
Line: 8
Function: require


回帖
  • 迅睿粉丝
    #1楼    迅睿粉丝
    2020-06-20 07:37:00
    Chrome 0
    环境不对,只能运行在php71以下
  • 迅睿粉丝
    #2楼    迅睿粉丝
    2020-06-20 08:45:17
    小米手机 0
    如果非要在这样的环境下运行怎么改呢?我看见只是几个函数用法错误而已
  • 迅睿粉丝
    #3楼    迅睿粉丝
    2020-06-20 09:06:57
    Chrome 0
    版本高了
  • 迅睿粉丝
    #4楼    迅睿粉丝
    2020-06-20 09:15:08
    小米手机 0
    我知道版本高了,现在就是要在这个环境下解决问题。因为必须用这个高版本环境,因为还有一套程序很消耗mysql,mysql8性能很好
  • 迅睿粉丝
    #5楼    迅睿粉丝
    2020-06-20 10:35:44
    Chrome 0
    要不把数据迁移到迅睿cms,迅睿cms支持更高的版本
  • 迅睿粉丝
    #6楼    迅睿粉丝
    2020-06-20 11:10:45
    小米手机 0
    不迁移,已经三年了,数据会错乱的,而且我改过很多
  • 迅睿粉丝
    #7楼    迅睿粉丝
    2020-06-22 11:16:38
    Firefox 77.0 0
    全论坛每一个人知道,我今天上午自己花了2小时解决了。答案公布一下,希望以后其他人用得到。任何老版本可以直接升级mysql8.0,以及php为7.4版本。修改三个文件:如下
    1:diy/dayrui/models/Category_model.php 108行2:diy/dayrui/models/Category_model.php 159行3:diy/dayrui/models/Category_model.php 216行4:diy/dayrui/libraries/Dip.php 84行把所有的{}改为[].1:diy/dayrui/libraries/Template.php 84行
    !$system['order'] && $system['order'] = $system['flag'] ? 'updatetime_desc' : $action == 'hits' ? 'hits' : 'updatetime'; // 默认排序参数改成
    !$system['order'] &&($system['order'] =$system['flag'] ? 'updatetime_desc' : $action) == 'hits' ? 'hits' : 'updatetime'; // 默认排序参数这样就ok,适用所有版本升级为最新最新版本。
    满意答案
  • 迅睿粉丝
    #8楼    迅睿粉丝
    2020-06-22 11:16:52
    Firefox 77.0 0
    @帅进:自己解决的完美答案