[英]Fatal error explanation?
I'm getting this fatal error message: 我收到此致命错误消息:
Fatal error: Can't use method return value in write context in C:\\wamp\\www\\mySite\\application\\controllers\\eventsManager.php on line 115 致命错误:在第115行的C:\\ wamp \\ www \\ mySite \\ application \\ controllers \\ eventsManager.php中的写入上下文中无法使用方法返回值
Could someone tell me what it means? 有人可以告诉我这是什么意思吗?
The line it refers to is this: 它引用的行是这样的:
$this->session->set_flashdata('alert') = '<ul>'.validation_errors('<li>','</li>').'</ul>';
该行应为:
$this->session->set_flashdata('alert', '<ul>'.validation_errors('<li>','</li>').'</ul>');
From a quick google search, I have gathered that the empty() function may be the culprit. 从谷歌的快速搜索中,我收集到empty()函数可能是罪魁祸首。 It isn't in your code but it may be in set_flashdata() somewhere. 它不在您的代码中,但可能在set_flashdata()中的某个位置。 empty() can only check a variable, not the return value of a function. empty()只能检查变量,而不能检查函数的返回值。 Assign validation_errors('<li>','</li>')
to at temp variable and insert the temp var instead. 将validation_errors('<li>','</li>')
分配给at temp变量,然后插入temp var。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.