PHP 读取session和往session写内容


    请求信息 : 2017-05-11 19:36:04 HTTP/1.1 GET : /DEVOPS/index.php/Main/index
    运行时间 : 0.0297s ( Load:0.0048s Init:0.0110s Exec:0.0004s Template:0.0134s )
    内存开销 : 2,012.68 kb
    查询信息 : 0 queries 0 writes
    文件加载 : 33
    缓存信息 : 0 gets 0 writes
    配置加载 : 138
    会话信息 : SESSION_ID=lsnqn8pks7hl9qet2she86pke5

node2:/var/www/html/DEVOPS/Home/Lib/Action#vim IndexAction.class.php

display();
         }

        function do_login(){
                //获取用户名和密码信息,和数据库中比对
                 echo 111111111;
                 dump($_POST);
                 echo 222222222;
                 dump($_SESSION);
                 echo 33333333;

                $username=$_POST['username'];
                $password=$_POST['password'];
                $code=$_POST['code'];
                 echo md5($code);
	

	
	111111111

array(3) {
  ["username"] => string(5) "admin"
  ["password"] => string(5) "admin"
  ["code"] => string(4) "5653"
}

222222222

array(3) {
  ["verify"] => string(32) "d7e4cdde82a894b8f633e6d61a01ef15"
  ["username"] => string(5) "admin"
  ["authority"] => string(1) "1"
}

33333333d7e4cdde82a894b8f633e6d61a01ef15

往SESSION写东西:

display();
         }

        function do_login(){
                //获取用户名和密码信息,和数据库中比对
                 $_SESSION['aaa']='ssada1';
                 echo 111111111;
                 dump($_POST);
                 echo 222222222;
                 dump($_SESSION);
                 echo 33333333;



111111111

array(3) {
  ["username"] => string(5) "admin"
  ["password"] => string(5) "admin"
  ["code"] => string(4) "7334"
}

222222222

array(4) {
  ["verify"] => string(32) "7fcb0a2c0f0f41d9f4454ac2d8ed7ad6"
  ["username"] => string(5) "admin"
  ["authority"] => string(1) "1"
  ["aaa"] => string(6) "ssada1"
}

333333337fcb0a2c0f0f41d9f4454ac2d8ed7ad6

你可能感兴趣的:(thinkphp回顾)