Home  >  Article  >  Backend Development  >  Why can't laravel5.2 get the session on the server? Is there anything stored in the files under sessions under storage?

Why can't laravel5.2 get the session on the server? Is there anything stored in the files under sessions under storage?

WBOY
WBOYOriginal
2016-09-30 09:37:331620browse

1. Use Session::put and get respectively, 2. It works fine locally, but the value cannot be obtained on the server, but it is saved. I also tried $request->session()->get or put, but the same problem occurred. 3. The corresponding startsession is also added to the middleware;

The code is as follows:
$before_time = Session::get($data['telephone']);
Session::put($data['telephone'],time());

Reply content:

1. Use Session::put and get respectively, 2. It works fine locally, but the value cannot be obtained on the server, but it is saved. I also tried $request->session()->get or put, but the same problem occurred. 3. The corresponding startsession is also added to the middleware;

The code is as follows:
$before_time = Session::get($data['telephone']);
Session::put($data['telephone'],time());

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn