PHP报错: Can't use method return value in write context

$dp_id = $this->getParam('dpId');
if(!empty($this->getParam('dpId'))) {
$this->smarty->assign('developer', get_developers($this->getParam('dpId')));
}

以上PHP会报错: Can't use method return value in write context 解决办法为分开写
$dp_id = $this->getParam('dpId');
if(!empty($dp_id)) {
$this->smarty->assign('developer', get_developers($this->getParam('dpId')));
}


上一篇:Python之路Python内置函数、zip()、max()、min()


下一篇:jdbc操作步骤和preparedStatment相比Statment的好处