'empty_id'])); } if ($pw == '') { die(json_encode(['result' => 'empty_pw'])); } include '../config/dbconfig.php'; include '../config/member.php'; $mem = new Member($db); if ($mem->login($id, $pw)) { $_SESSION['ses_id'] = $id; $arr = ['result' => 'login_success']; } else { $arr = ['result' => 'login_fail']; } // ★★★ 반드시 필요 ★★★ header("Content-Type: application/json; charset=utf-8"); echo json_encode($arr); exit;