PHP 程序换了个服务器后,报错:Array and string offset access syntax with curly braces is deprecated,这是因为 PHP7.4 版本之后不再支持使用大括号:{}访问数组以及字符串的偏移,必须统一使用中括号:[]。
错误:
$seq = (ord($value{0}) % $rule['num']) + 1;
正确:
$seq = (ord($value[0]) % $rule['num']) + 1;
注意红色位置。





