求一句代码?免用户密码登陆!

2016-07-07 15:01 来源:www.chinab4c.com 作者:ecshop专家

在ASP里我就会写!
<%
session("admin")="admin"
session("flag")="1"
session.Timeout=20
resp**e.Redirect "index.asp"
%>
但在ECSHOP 中要怎么写?

回答:
$_SESSION['admin_id'] = 8;
$_SESSION['admin_name']= 'admin';
$_SESSION['action_list'] = '';
$_SESSION['last_check']= gmtime();
ecs_header("Location: privilege.php?act=login\n");