Why in this code, the error says that role is an undefined index, but the role has been set to an index type index in my database
黄子乐
黄子乐 2017-11-10 14:13:57
0
4
1224

//If it is an admin user, update the role in the user information user_info in the current session for page call

if (Session::get('user_info.name') == 'admin') {

Session::set('user_info.role', $data['role']);

}


黄子乐
黄子乐

reply all (1)
路过

Just print $data to see if there is any

  • reply $data['id'] exists and can be printed, but $data['role'] cannot. . . what's up
    黄子乐 author 2017-11-10 17:35:54
  • reply Have you solved it? Mine is the same.
    丶从不低调 author 2018-02-10 17:31:37
  • reply You didn't take it out
    路过 author 2017-11-12 18:03:53
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!