From ea6337e9e6b449a90cb8ab4ab2d3c7d52ba8276f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B7=B4=E6=8E=8C?= Date: Mon, 10 Dec 2018 16:33:16 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=AD=A6=E7=94=9F=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E4=B8=8A=E4=BC=A0=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/renshi/controller/Student.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/application/renshi/controller/Student.php b/application/renshi/controller/Student.php index 9f99abd9..a4201bbe 100644 --- a/application/renshi/controller/Student.php +++ b/application/renshi/controller/Student.php @@ -310,7 +310,7 @@ class Student extends Base $students[$i]['banji'] = $bj; $students[$i]['xingming'] = $value[1]; $students[$i]['shenfenzhenghao'] = $value[2]; - substr($value[2],16,17)%2 == 1 ? $students[$i]['sex']=1 :$students[$i]['sex']=0; + intval(substr($value[2],16,1) )% 2 ? $students[$i]['sex'] = 1 :$students[$i]['sex'] = 0 ; $students[$i]['shengri'] = substr($value[2],6,4).'-'.substr($value[2],10,2).'-'.substr($value[2],12,2); $students[$i]['school'] = $list['school']; $stuid = STU::where('shenfenzhenghao',$value[2])->value('id'); @@ -318,7 +318,6 @@ class Student extends Base // 销毁无用变量 $i++; } - // dump($students); // 实例化学生信息数据模型