request->post['telephone'])) { $this->error['telephone'] = $this->language->get('error_telephone'); } else{ $telephone_v = $this->model_account_customer-&g"/> request->post['telephone'])) { $this->error['telephone'] = $this->language->get('error_telephone'); } else{ $telephone_v = $this->model_account_customer-&g">

php if判断出现的鬼怪问题

WBOY
發布: 2016-06-02 11:28:30
原創
1096 人瀏覽過

phpif判断

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,错误正常显示。

相關標籤:
來源:php.cn
本網站聲明
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn
熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板
關於我們 免責聲明 Sitemap
PHP中文網:公益線上PHP培訓,幫助PHP學習者快速成長!