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

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

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

      1. <tfoot id='vZ8My'></tfoot>
        <legend id='vZ8My'><style id='vZ8My'><dir id='vZ8My'><q id='vZ8My'></q></dir></style></legend>

        首次访问页面时,Drupal 生成的 HTML 上方出现神秘数字

        时间:2023-06-22

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

              <legend id='y2HMX'><style id='y2HMX'><dir id='y2HMX'><q id='y2HMX'></q></dir></style></legend>
              <i id='y2HMX'><tr id='y2HMX'><dt id='y2HMX'><q id='y2HMX'><span id='y2HMX'><b id='y2HMX'><form id='y2HMX'><ins id='y2HMX'></ins><ul id='y2HMX'></ul><sub id='y2HMX'></sub></form><legend id='y2HMX'></legend><bdo id='y2HMX'><pre id='y2HMX'><center id='y2HMX'></center></pre></bdo></b><th id='y2HMX'></th></span></q></dt></tr></i><div id='y2HMX'><tfoot id='y2HMX'></tfoot><dl id='y2HMX'><fieldset id='y2HMX'></fieldset></dl></div>
                <tbody id='y2HMX'></tbody>
              <tfoot id='y2HMX'></tfoot>
              • <bdo id='y2HMX'></bdo><ul id='y2HMX'></ul>
                  本文介绍了首次访问页面时,Drupal 生成的 HTML 上方出现神秘数字的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  在我的 Drupal 站点上的许多页面上,当第一次在(编辑)任何浏览器中访问该页面时,HTML 上方(和下方)会出现一个神秘数字.在 IE7 和 IE8 中,有问题的页面呈现不正确,但在其他浏览器中,页面的其余部分呈现没有问题.刷新后,该数字通常会消失.我的用户告诉我该错误每天早上都会再次发生,尽管我见过一个用户刷新并且陌生号码没有消失的情况.我在使用其他浏览器时没有遇到任何问题.

                  这是 HTML 的前几行:

                  3535<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><头><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>

                  ...页面的其余部分正常生成,然后我在底部看到以下内容:

                  0

                  我很困惑 - apache 日志或我的 vhost error.log 上都没有出现任何相关内容.我已经对带有数字的页面与没有和除了顶部和底部数字之外的页面的 html 进行了比较,唯一的区别是空格.

                  我在 Ubuntu 7.04 上的 Apache 2.2 中运行 Drupal 6.19.PHP 版本为 5.2.

                  这里是我的 index.php 供参考 - 我认为我们没有对标准进行任何更改.

                  解决方案

                  在花大量时间检查自己的代码之前,先分析一下所涉及的网络设置.

                  大约一年前,我们遇到了类似的现象代理服务器将类似的数字插入到他转发的页面中.

                  我不记得它是什么代理服务器的详细信息,以及他为什么这样做,但很明显,因为只有从某些网络访问该站点的人才能获得这些数字.

                  我不是 100% 确定,但我认为是 这个 nginx反向代理问题(这篇文章也可能与此相关.)

                  On a number of pages on my Drupal site a mysterious number appears above (EDIT: and below) the HTML the first time the page is visited in (EDIT) any browser. In IE7 and IE8 the problem pages are rendering incorrectly, but in the other browsers the rest of the page renders without problems. After a refresh the number usually disappears. My users tell me that the error occurs again each morning, although I've seen one case where a user refreshes and the strange number does NOT go away. I've had no problems with other browsers.

                  Here are the first few lines of HTML:

                  3535 
                  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"   http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 
                  <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
                  

                  .. the rest of the page generates normally, and then I see the following at the bottom:

                  </html> 
                  
                  0 
                  

                  I'm baffled - nothing related appears on either apache logs or my vhost error.log. I've done a diff of the html on pages with the number versus pages without and apart from the numbers at top and bottom the only difference is whitespace.

                  I'm running Drupal 6.19 in Apache 2.2 on Ubuntu 7.04. PHP version is 5.2.

                  For reference here's my index.php - I don't think there's anything that we've changed from the standard.

                  <?php
                  // $Id: index.php,v 1.94 2007/12/26 08:46:48 dries Exp $
                  
                  /**
                   * (Drupal copyright ommitted for brevity)
                   */
                  
                  require_once './includes/bootstrap.inc';
                  drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
                  
                  $return = menu_execute_active_handler();
                  
                  // Menu status constants are integers; page content is a string.
                  if (is_int($return)) {
                    switch ($return) {
                      case MENU_NOT_FOUND:
                        drupal_not_found();
                        break;
                      case MENU_ACCESS_DENIED:
                        drupal_access_denied();
                        break;
                      case MENU_SITE_OFFLINE:
                        drupal_site_offline();
                        break;
                    }
                  }
                  elseif (isset($return)) {
                    // Print any value (including an empty string) except NULL or undefined:
                    print theme('page', $return);
                  }
                  
                  drupal_page_footer();
                  

                  解决方案

                  Before spending much time checking your own code, analyze the involved network setup.

                  We had a similar phenomenon about a year ago where a proxy server inserted numbers like that into the pages he relayed.

                  I do not remember the details about what proxy server it was, and why he did it, but it was pretty obvious, as only people accessing the site from certain networks would get these numbers.

                  EDIT: I'm not 100% sure, but I think it was this nginx reverse proxy issue (This post might be related as well.)

                  这篇关于首次访问页面时,Drupal 生成的 HTML 上方出现神秘数字的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                        • <small id='9LEH7'></small><noframes id='9LEH7'>

                            <tbody id='9LEH7'></tbody>

                        • <tfoot id='9LEH7'></tfoot>