public function create() { $data = array(); $data['user_browser'] = GetBrowser(); $data['user_ip'] = GetIP(); $data['user_lang'] = GetLang(); $data['user_os'] = GetOs(); $result = D('User')->addData($data); echo '<pre/>'; print_r($result); }
function login_log($authInfo){ $model = M('Login_log'); $add_data['member_id'] = $authInfo['id']; $add_data['member_name'] = $authInfo['username']; $add_data['ip'] = $ip; $add_data['province'] = $dizhi['province']; $add_data['city'] = $dizhi['city']; $add_data['district'] = $dizhi['district']; $add_data['browser'] = GetBrowser(); $add_data['os'] = GetOs(); $model->add($add_data); }