【发布时间】:2013-01-05 03:10:17
【问题描述】:
我有代码可以检查用户是否在文本字段中输入了数据:
if ( $this->input->post('current_password') ||
$this->input->post('new_password') ||
$this->input->post('repeat_password') ) {
return true;
} else {
return false;
}
为什么上面的代码返回false,而下面的代码返回true?
if ( $this->input->post('current_password') ) {
return true;
} else {
return false;
}
【问题讨论】:
-
你需要解释更多关于你的代码的逻辑。
标签: php codeigniter if-statement