【问题标题】:Symfony\Component\Debug\Exception\FatalErrorException' with message 'Class 'session' not found'Symfony\Component\Debug\Exception\FatalErrorException' 带有消息 'Class 'session' not found'
【发布时间】:2017-01-10 07:22:21
【问题描述】:

local.ERROR: 异常 'Symfony\Component\Debug\Exception\FatalErrorException' 并在 D:\b7c5702095ce08f079bddb25840d3c122657b351.php:60 中发现消息 'Class 'session' not found'

【问题讨论】:

  • 我不知道你想做什么,但我想你应该使用Session而不是session,注意大写S
  • @Michel 所说的是正确的,如果您想了解更多信息,请向我们展示您的代码。

标签: laravel session


【解决方案1】:

您需要使用正确的类名并将其与命名空间一起使用:

\Season::

或者在你的类的顶部添加一个命名空间:

use Session;

然后使用没有命名空间的类:

Session::

【讨论】:

    猜你喜欢
    • 2016-02-02
    • 1970-01-01
    • 2014-11-11
    • 1970-01-01
    • 2020-05-28
    • 2019-08-02
    • 2020-05-15
    • 1970-01-01
    • 2019-01-17
    相关资源
    最近更新 更多