• <small id='ybgqf'></small><noframes id='ybgqf'>

        <legend id='ybgqf'><style id='ybgqf'><dir id='ybgqf'><q id='ybgqf'></q></dir></style></legend>
          <bdo id='ybgqf'></bdo><ul id='ybgqf'></ul>

      1. <tfoot id='ybgqf'></tfoot>

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

        如何获取 Drupal 页面的完整 URL?

        How to get the full URL of a Drupal page?(如何获取 Drupal 页面的完整 URL?)
      3. <small id='R1nL5'></small><noframes id='R1nL5'>

          <tbody id='R1nL5'></tbody>

        • <bdo id='R1nL5'></bdo><ul id='R1nL5'></ul>
            <legend id='R1nL5'><style id='R1nL5'><dir id='R1nL5'><q id='R1nL5'></q></dir></style></legend>

                  <tfoot id='R1nL5'></tfoot>

                  <i id='R1nL5'><tr id='R1nL5'><dt id='R1nL5'><q id='R1nL5'><span id='R1nL5'><b id='R1nL5'><form id='R1nL5'><ins id='R1nL5'></ins><ul id='R1nL5'></ul><sub id='R1nL5'></sub></form><legend id='R1nL5'></legend><bdo id='R1nL5'><pre id='R1nL5'><center id='R1nL5'></center></pre></bdo></b><th id='R1nL5'></th></span></q></dt></tr></i><div id='R1nL5'><tfoot id='R1nL5'></tfoot><dl id='R1nL5'><fieldset id='R1nL5'></fieldset></dl></div>
                  本文介绍了如何获取 Drupal 页面的完整 URL?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我需要在 Drupal 站点中获取当前页面的 URL.它是什么内容类型无关紧要 - 可以是任何类型的节点.

                  I need to be grabbing the URL of the current page in a Drupal site. It doesn't matter what content type it is - can be any type of node.

                  我不是在寻找主题的路径、基本网址或 Drupal 的 get_destination.我正在寻找一个函数或变量,它可以为我提供以下完整信息:

                  I am NOT looking for the path to theme, or the base url, or Drupal's get_destination. I'm looking for a function or variable that will give me the following in full:

                  http://example.com/node/number

                  无论有没有(更有可能)http://.

                  Either with or without (more likely) the http://.

                  推荐答案

                  drupal_get_destination() 有一些内部代码指向正确的位置来获取当前的内部路径.要将该路径转换为绝对 URL,url() 函数应该执行以下操作诡计.如果传入 'absolute' 选项,它将生成完整的 URL,而不仅仅是内部路径.它还将为当前路径交换任何路径别名.

                  drupal_get_destination() has some internal code that points at the correct place to getthe current internal path. To translate that path into an absolute URL, the url() function should do the trick. If the 'absolute' option is passed in it will generate the full URL, not just the internal path. It will also swap in any path aliases for the current path as well.

                  $path = isset($_GET['q']) ? $_GET['q'] : '<front>';
                  $link = url($path, array('absolute' => TRUE));
                  

                  这篇关于如何获取 Drupal 页面的完整 URL?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  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 的问题)

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

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

                          <legend id='wccwn'><style id='wccwn'><dir id='wccwn'><q id='wccwn'></q></dir></style></legend>
                            <tbody id='wccwn'></tbody>
                            <bdo id='wccwn'></bdo><ul id='wccwn'></ul>
                          • <tfoot id='wccwn'></tfoot>