$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‘))); }
PHP报错: Can't use method return value in write context
原文:http://www.cnblogs.com/meibao/p/4860975.html