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

      <tfoot id='h9wiv'></tfoot>
    1. 独立脚本的 Drupal 会话用户 ID

      Drupal Session User id for independent script(独立脚本的 Drupal 会话用户 ID)
      <tfoot id='dVRMi'></tfoot>
        <tbody id='dVRMi'></tbody>

            <legend id='dVRMi'><style id='dVRMi'><dir id='dVRMi'><q id='dVRMi'></q></dir></style></legend>
          • <small id='dVRMi'></small><noframes id='dVRMi'>

              • <bdo id='dVRMi'></bdo><ul id='dVRMi'></ul>
                <i id='dVRMi'><tr id='dVRMi'><dt id='dVRMi'><q id='dVRMi'><span id='dVRMi'><b id='dVRMi'><form id='dVRMi'><ins id='dVRMi'></ins><ul id='dVRMi'></ul><sub id='dVRMi'></sub></form><legend id='dVRMi'></legend><bdo id='dVRMi'><pre id='dVRMi'><center id='dVRMi'></center></pre></bdo></b><th id='dVRMi'></th></span></q></dt></tr></i><div id='dVRMi'><tfoot id='dVRMi'></tfoot><dl id='dVRMi'><fieldset id='dVRMi'></fieldset></dl></div>
                本文介绍了独立脚本的 Drupal 会话用户 ID的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                我正在创建一个简单的脚本,比如 a.php.我知道drupal 6 创建了一个会话等等.所以在我的a.php 中我试图print_r($_SESSION);但这似乎不起作用.在我的程序中获取登录用户 userid 的最佳方法是什么?

                I am creating a simple script say a.php. I know that drupal 6 creates a session etc. So in my a.php I am trying to print_r($_SESSION); but that doesnt seem to work. What is the best way to get the logged in users userid in my program?

                抱歉,我是 Drupal 的新手.感谢您抽出宝贵时间.

                Sorry I am new to drupal. Thank you for your time.

                推荐答案

                Drupal 的 cron.php 是使用 Drupal 的/includes 目录中的库的简单"php 脚本的完美示例.该文件中的关键行是:

                Drupal's cron.php is a perfect example of a "simple" php script that uses the libraries in Drupal's /includes directory. The key lines in that file are:

                include_once './includes/bootstrap.inc';
                drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
                

                如果您将这些包含在您自己的代码中,您的 a.php 文件将可以访问所有 Drupal 的上下文和库.

                if you include those in your own code, your a.php file will have access to all of Drupal's context and libraries.

                这篇关于独立脚本的 Drupal 会话用户 ID的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                相关文档推荐

                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 的问题)
                  <tbody id='BE3xh'></tbody>

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

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

                      <bdo id='BE3xh'></bdo><ul id='BE3xh'></ul>