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

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

      1. 在外部 PHP 文件中调用 Drupal 函数

        Calling Drupal functions in external PHP file(在外部 PHP 文件中调用 Drupal 函数)
        • <bdo id='jCgh3'></bdo><ul id='jCgh3'></ul>
            <legend id='jCgh3'><style id='jCgh3'><dir id='jCgh3'><q id='jCgh3'></q></dir></style></legend>

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

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

                • <tfoot id='jCgh3'></tfoot>
                  本文介绍了在外部 PHP 文件中调用 Drupal 函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  如何调用 Drupal 函数或获取位于 drupal 安装文件夹下的 PHP 文件中的全局变量.我第一次这样做.是否需要在代码中包含任何文件才能访问 Drupal 函数或变量?

                  How can I call a Drupal function or get the global variable in a PHP file which is located under the drupal installation folder. I doing it for the first time. Are there any files I need to include in my code in order to access the Drupal function or variables?

                  推荐答案

                  摘自上述评论中的链接问题

                  您需要在外部 PHP 文件中引导 Drupal:

                  You need to Bootstrap Drupal in the external PHP file:

                  /** bootstrap Drupal **/
                  chdir("/path/to/drupal/site/htdocs");
                  require_once './includes/bootstrap.inc';
                  drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
                  

                  请务必更改 Drupal 安装路径,然后在上面发布的代码下方添加您的代码.

                  Be sure to change the path to your Drupal installation, then add your code below the code posted above.

                  这篇关于在外部 PHP 文件中调用 Drupal 函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  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='27W9t'></tbody>
                  <legend id='27W9t'><style id='27W9t'><dir id='27W9t'><q id='27W9t'></q></dir></style></legend>

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

                      <small id='27W9t'></small><noframes id='27W9t'>