tp5在php7下出現Array and string offset access syntax with curly braces is deprecated

當tp5在php7下出現Array and string offset access syntax with curly braces is deprecated,
我們就獲取不到查詢的值,這是因爲php7之後不再支持使用大括號訪問數組以及字符串的偏移
所以需要

修改一處代碼
文件所在:thinkphp\library\think\db\Query.php

// 按照字段的首字母的值分表
$seq = (ord($value{0}) % $rule['num']) + 1;
$value{0} 改爲$value[0];
————————————————
版權聲明:本文爲CSDN博主「coderczw」的原創文章,遵循 CC 4.0 BY-SA 版權協議,轉載請附上原文出處鏈接及本聲明。
原文鏈接:https://blog.csdn.net/GeChan_W/article/details/104853453

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章