【发布时间】:2018-07-20 23:28:34
【问题描述】:
我正在使用 laravel 登录,并且在 localhost 中一切正常,但是当我移动到实时服务器时,即使我添加了 csrf token,它的抛出页面已过期错误
我的表格是这样的
<form method="POST" action="{{ route('login') }}" role="form">
{{ csrf_field() }}
<input id="email" type="email" class="form-control" name="email" value="{{ old('email') }}" required autofocus>
@if ($errors->has('email'))
<span class="help-block">
<strong>{{ $errors->first('email') }}</strong>
</span>
@endif
<input id="password" type="password" class="form-control" name="password" required>
@if ($errors->has('password'))
<span class="help-block">
<strong>{{ $errors->first('password') }}</strong>
</span>
@endif
<button type="submit" class="btn btn-green">Sign in</button>
</form>
我尝试使用php artisan cache:clear 清除服务器缓存并重新启动我的 apache 2 服务器
我还尝试清除 config/framework/session 文件夹和 config.framework/views 中的会话
即使它仍然存在
谁能帮帮我??? 谢谢
【问题讨论】:
-
你有
.env文件吗? -
是的,我有 .env 文件
-
执行
php artisan key:generate并检查会发生什么。 -
是的,我没有帮助:/