1. The Session class cannot be like the teacher, errors will occur. 2. Did the teacher add js to the body part of login.html? I did not use the public method because my index and the js in the welcome part are different. It should be said that welcome does not have js but only css, so I am very confused and the result is wrong.
Can only display Session::set('user_id',$userName); Session::set('user_info',$data);
use tink\session; introduce
Session has nothing to do with js. See if you have introduced the session class