Does anyone know that after I added session:set() to the controller, the method failed and no error was reported? Please help me find out why. I used phpstudy to deploy the apache server!
The code is as follows:
<?phpnamespace app\index\controller;
use app\index\controller\Base;use think\Request;
use app\index\model\User as UserModel;
use think\Session;
class User extends Base{
// Login page
function login() %
有什么是忘不了的。2020-01-07 19:34:31
I think it's your session::set('user_info', $user->getdata()); that is wrong. The getdata in $user->getdata() should be getData