Firebug show import语句被加载两次


Firebug show import statements are loaded twice

我的index.php文件中有几个导入语句。这个网站有点慢,所以我试着调试它。当我第一次加载页面时,firebug显示它加载了两次import语句。第二个"拷贝"仍然在加载中(它有一个动态的指示,它正在加载)。我在firebug中使用Net来查看结果。

在铬然而,它只显示一次。我有最新的稳定版本1.7.3,我正在使用firefox 5。

Index.php有两个include_once语句。首先包括文件有数据库连接和少量的导入语句。第二个有标题(简单的HTML语句-没什么花哨的)。

这是一个firebug问题还是我这边的什么?

index . php

<htmL>
<head>
</head>
<body>
<?php
include_once('db_con.php');
include_once('header.php');
?>
<div id="displayAjax"></div>
</body>
</html>

db_con.php

<?php
$host="host";
$username="user";
$password="pass";
$database="dbname";
$table1="table1";
$table2="table2";
$table2="table3"; 
$con = mysql_connect("$host", "$username", "$password")or die("cannot connect"); 
$select_db = mysql_select_db("$database")or die("cannot select DB");
ini_set('max_execution_time', 300);
session_start(); 
?>
<html>
<head>
<link rel="stylesheet" type="text/css" href="import/file.css" />
<script type="text/javascript" src="import/jquery.js"></script>
<script type="text/javascript" src="import/ajax.js"></script>
</head>
</html>

header。php

<?php
include_once('db_con.php');
?>
<html>
<head>
</head>
<body>
<div>
<p>Title</p>

Search for: 
<input type="textbox" size="27" id="id" class="class" />
<input type="button" value="Search" onclick="searchFunction()" />
</div>    
</body>
</html>
所以我创建了一个新文件new.html。只有HTML语法,没有PHP或JS。
<html>
<head>
<title>Title</title>
</head>
<body>
<p>Something</p>
</body>
</html>

我直接进入链接,没有包含或导入。这个还能装两次。

第一个已加载,显示"Something",第二个仍在加载,并带有动态指示器。

解析完所有包含之后,您就有了两个完整的HTML文档。浏览器决定如何处理生成的无效文档,这取决于浏览器。

db_con.php中取出HTML;它与数据库连接无关。