Home > Backend Development > PHP Tutorial > 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
Release: 2016-09-30 09:37:33
Original
1675 people have browsed it

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());

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template