首页 资源列表 文章列表

Required parameter $params follows optional parameter

在PHP 8中,当函数参数存在默认值时,必须将带默认值的参数放在非默认参数的右侧

错误写法

function ReplaceListVars($no, $listtemp, $subnews, $subtitle, $formatdate, $haveclass=0, $docode=0, $url, $r, $field) {  

正确写法

function ReplaceListVars($no, $listtemp, $subnews, $subtitle, $formatdate, $url, $r, $field, $haveclass=0, $docode=0) {