<legend id='Qk5L3'><style id='Qk5L3'><dir id='Qk5L3'><q id='Qk5L3'></q></dir></style></legend>

        <i id='Qk5L3'><tr id='Qk5L3'><dt id='Qk5L3'><q id='Qk5L3'><span id='Qk5L3'><b id='Qk5L3'><form id='Qk5L3'><ins id='Qk5L3'></ins><ul id='Qk5L3'></ul><sub id='Qk5L3'></sub></form><legend id='Qk5L3'></legend><bdo id='Qk5L3'><pre id='Qk5L3'><center id='Qk5L3'></center></pre></bdo></b><th id='Qk5L3'></th></span></q></dt></tr></i><div id='Qk5L3'><tfoot id='Qk5L3'></tfoot><dl id='Qk5L3'><fieldset id='Qk5L3'></fieldset></dl></div>

        <small id='Qk5L3'></small><noframes id='Qk5L3'>

      1. <tfoot id='Qk5L3'></tfoot>
        • <bdo id='Qk5L3'></bdo><ul id='Qk5L3'></ul>

        如何从 laravel 应用程序访问全局变量 $_SESSION 和 $_COOKIE?

        How to access the globals $_SESSION and $_COOKIE from a laravel app?(如何从 laravel 应用程序访问全局变量 $_SESSION 和 $_COOKIE?)
      2. <legend id='2yMph'><style id='2yMph'><dir id='2yMph'><q id='2yMph'></q></dir></style></legend>
        • <bdo id='2yMph'></bdo><ul id='2yMph'></ul>

              <i id='2yMph'><tr id='2yMph'><dt id='2yMph'><q id='2yMph'><span id='2yMph'><b id='2yMph'><form id='2yMph'><ins id='2yMph'></ins><ul id='2yMph'></ul><sub id='2yMph'></sub></form><legend id='2yMph'></legend><bdo id='2yMph'><pre id='2yMph'><center id='2yMph'></center></pre></bdo></b><th id='2yMph'></th></span></q></dt></tr></i><div id='2yMph'><tfoot id='2yMph'></tfoot><dl id='2yMph'><fieldset id='2yMph'></fieldset></dl></div>
            1. <small id='2yMph'></small><noframes id='2yMph'>

                <tbody id='2yMph'></tbody>

                  <tfoot id='2yMph'></tfoot>
                  本文介绍了如何从 laravel 应用程序访问全局变量 $_SESSION 和 $_COOKIE?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在开发一个需要在自定义 php 项目之外工作的 laravel 项目,因为我需要访问 laravel 应用程序中的纯 php 全局变量 $_SESSION 和 $_COOKIE.

                  I am working on a laravel project that needs to work besides a custom php project, because that I need to get access to the pure php globals $_SESSION and $_COOKIE in the laravel app.

                  到目前为止,我得到的只是 null 或空.有人知道怎么做吗?

                  Until now I'm geting just null or empty. Somebody know how to do that?

                  推荐答案

                  Laravel 有自己的 $_SESSION$_COOKIE 的实现,所以恐怕你不能通过这些超全局变量访问它们.

                  Laravel has its own implementations of $_SESSION and $_COOKIE, so I'm afraid you cannot access them via those superglobals.

                  为了克服这个问题,您可以在 Laravel 应用程序中执行以下操作,将数据从一个传输到另一个:

                  To try to overcome that, what you can do, in your Laravel app, is to transfer data from one to the other by doing something like:

                  foreach(Session::all() $key => $value)
                  {
                      $_SESSION[$key] = $value;
                  }
                  

                  这篇关于如何从 laravel 应用程序访问全局变量 $_SESSION 和 $_COOKIE?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  DeepL的翻译效果还是很强大的,如果我们要用php实现DeepL翻译调用,该怎么办呢?以下是代码示例,希望能够帮到需要的朋友。 在这里需要注意,这个DeepL的账户和api申请比较难,不支持中国大陆申请,需要拥有香港或者海外信用卡才行,没账号的话,目前某宝可以
                  PHP通过phpspreadsheet导入Excel日期,导入系统后,全部变为了4开头的几位数字,这是为什么呢?原因很简单,将Excel的时间设置问文本,我们就能看到该日期本来的数值,上图对应的数值为: 要怎么解决呢?进行数据转换就行,这里可以封装方法,或者用第三方的
                  mediatemple - can#39;t send email using codeigniter(mediatemple - 无法使用 codeigniter 发送电子邮件)
                  Laravel Gmail Configuration Error(Laravel Gmail 配置错误)
                  Problem with using PHPMailer for SMTP(将 PHPMailer 用于 SMTP 的问题)
                  Issue on how to setup SMTP using PHPMailer in GoDaddy server(关于如何在 GoDaddy 服务器中使用 PHPMailer 设置 SMTP 的问题)

                    <tfoot id='U0Q00'></tfoot>
                        • <bdo id='U0Q00'></bdo><ul id='U0Q00'></ul>
                            <tbody id='U0Q00'></tbody>

                            <i id='U0Q00'><tr id='U0Q00'><dt id='U0Q00'><q id='U0Q00'><span id='U0Q00'><b id='U0Q00'><form id='U0Q00'><ins id='U0Q00'></ins><ul id='U0Q00'></ul><sub id='U0Q00'></sub></form><legend id='U0Q00'></legend><bdo id='U0Q00'><pre id='U0Q00'><center id='U0Q00'></center></pre></bdo></b><th id='U0Q00'></th></span></q></dt></tr></i><div id='U0Q00'><tfoot id='U0Q00'></tfoot><dl id='U0Q00'><fieldset id='U0Q00'></fieldset></dl></div>

                            <small id='U0Q00'></small><noframes id='U0Q00'>

                            <legend id='U0Q00'><style id='U0Q00'><dir id='U0Q00'><q id='U0Q00'></q></dir></style></legend>