<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

      时间:2023-06-23
      <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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                上一篇:Drupal - 将“user/%/edit/uprofile"设置为“user/%/edit"上的 下一篇:将自定义变量传递给 paypal IPN

                相关文章

                <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>