miqusn 2016-02-24 02:25
浏览 511
已结题

php if判断出现的鬼怪问题

if ( !preg_match("/^1[34578]\d{9}$/",$this->request->post['telephone'])) {
$this->error['telephone'] = $this->language->get('error_telephone');
}
else{
$telephone_v = $this->model_account_customer-> getTelephoneValidation($this->request->post['telephone']);
if($telephone_v != 0) {

// $this->error['telephone'] = $this->language->get('error_telephone_v');
printf("得到的数据为:%d", $telephone_v);
$this->error['telephone'] = $this->language->get('error_telephone_v');
}

}
让人惊讶的是 $telephone_v =0 很能执行并打印了0,错误正常显示。

  • 写回答

0条回答

    报告相同问题?

    悬赏问题

    • ¥20 腾讯企业邮箱邮件可以恢复么
    • ¥15 有人知道怎么将自己的迁移策略布到edgecloudsim上使用吗?
    • ¥15 错误 LNK2001 无法解析的外部符号
    • ¥50 安装pyaudiokits失败
    • ¥15 计组这些题应该咋做呀
    • ¥60 更换迈创SOL6M4AE卡的时候,驱动要重新装才能使用,怎么解决?
    • ¥15 让node服务器有自动加载文件的功能
    • ¥15 jmeter脚本回放有的是对的有的是错的
    • ¥15 r语言蛋白组学相关问题
    • ¥15 Python时间序列如何拟合疏系数模型