read($uid); $pwd = md5($user['password']); $tokenkey = md5(xn_key()); $token = xn_encrypt("$ip $time $uid $pwd", $tokenkey); return $token; } // 前台登录验证 function user_login_check() { global $user; empty($user) AND http_location(url('user-login')); } // 获取用户来路 function user_http_referer() { $referer = param('referer'); // 优先从参数获取 | GET is priority empty($referer) AND $referer = array_value($_SERVER, 'HTTP_REFERER', ''); $referer = str_replace(array('\"', '"', '<', '>', ' ', '*', "\t", "\r", "\n"), '', $referer); // 干掉特殊字符 strip special chars if( !preg_match('#^(http|https)://[\w\-=/\.]+/[\w\-=.%\#?]*$#is', $referer) || strpos($referer, 'user-login.htm') !== FALSE || strpos($referer, 'user-logout.htm') !== FALSE || strpos($referer, 'user-create.htm') !== FALSE || strpos($referer, 'user-setpw.htm') !== FALSE || strpos($referer, 'user-resetpw_complete.htm') !== FALSE ) { $referer = './'; } return $referer; } function user_auth_check($token) { global $time; $auth = param(2); $s = decrypt($auth); empty($s) AND message(-1, lang('decrypt_failed')); $arr = explode('-', $s); count($arr) != 3 AND message(-1, lang('encrypt_failed')); list($_ip, $_time, $_uid) = $arr; $_user = user_read($_uid); empty($_user) AND message(-1, lang('user_not_exists')); $time - $_time > 3600 AND message(-1, lang('link_has_expired')); return $_user; } ?>
Error[2]: session_start(): Cannot send session cookie - headers already sent by (output started at /www/wwwroot/xiuluo1/tmp/model_user.func.php:1), File: /www/wwwroot/xiuluo1/tmp/model_session.func.php, Line: 210
File: /www/wwwroot/xiuluo1/tmp/model_session.func.php, Line: 210, session_start()
File: /www/wwwroot/xiuluo1/tmp/index.inc.php, Line: 15, sess_start()
File: /www/wwwroot/xiuluo1/index.php, Line: 52, include(/www/wwwroot/xiuluo1/tmp/index.inc.php)
Error[2]: Cannot modify header information - headers already sent by (output started at /www/wwwroot/xiuluo1/tmp/model_user.func.php:1), File: /www/wwwroot/xiuluo1/tmp/model_session.func.php, Line: 69
File: /www/wwwroot/xiuluo1/tmp/model_session.func.php, Line: 69, setcookie(cookie_test , wYh9wmyl0UGjBLJIyTRYEz_2BI7i3EJonYpzPPUCQz4u7i0C7a , 1776636986 , )
File: /www/wwwroot/xiuluo1/tmp/model_session.func.php, Line: 41, sess_new(6684e172a27f11f1b860b65e103574e4)
File: , Line: , sess_read(6684e172a27f11f1b860b65e103574e4)
File: /www/wwwroot/xiuluo1/tmp/model_session.func.php, Line: 210, session_start()
File: /www/wwwroot/xiuluo1/tmp/index.inc.php, Line: 15, sess_start()
File: /www/wwwroot/xiuluo1/index.php, Line: 52, include(/www/wwwroot/xiuluo1/tmp/index.inc.php)
Error[2]: session_start(): Cannot send session cache limiter - headers already sent (output started at /www/wwwroot/xiuluo1/tmp/model_user.func.php:1), File: /www/wwwroot/xiuluo1/tmp/model_session.func.php, Line: 210
File: /www/wwwroot/xiuluo1/tmp/model_session.func.php, Line: 210, session_start()
File: /www/wwwroot/xiuluo1/tmp/index.inc.php, Line: 15, sess_start()
File: /www/wwwroot/xiuluo1/index.php, Line: 52, include(/www/wwwroot/xiuluo1/tmp/index.inc.php)

Fatal error: Uncaught Error: Call to undefined function user_token_get() in /www/wwwroot/xiuluo1/tmp/index.inc.php:26 Stack trace: #0 /www/wwwroot/xiuluo1/index.php(52): include() #1 {main} thrown in /www/wwwroot/xiuluo1/tmp/index.inc.php on line 26