我的问题是,我的php网站被调用了两次.但我不知道为什么.在我的访问日志中,如果我重新加载,我还会得到两个条目:
127.0.0.12 - - [13/Oct/2010:20:41:56 +0200] "POST /index.php HTTP/1.1" 200 1493 "http://mkw-testing/index.php" "Mozilla/5.0 (X11; U; Linux i686; en-US) AppleWebKit/534.7 (KHTML, like Gecko) Chrome/7.0.517.36 Safari/534.7"
127.0.0.12 - - [13/Oct/2010:20:41:57 +0200] "GET /favicon.ico HTTP/1.1" 200 1498 "-" "Mozilla/5.0 (X11; U; Linux i686; en-US) AppleWebKit/534.7 (KHTML, like Gecko) Chrome/7.0.517.36 Safari/534.7"
Run Code Online (Sandbox Code Playgroud)
我的error.log显示:
[Wed Oct 13 21:08:35 2010] [debug] mod_deflate.c(615): [client 127.0.0.12] Zlib: Compressed 2766 to 1067 : URL /index.php
[Wed Oct 13 21:08:35 2010] [debug] mod_deflate.c(615): [client 127.0.0.12] Zlib: Compressed 2743 to 1038 : URL /index.php/favicon.ico
Run Code Online (Sandbox Code Playgroud)
我能做什么?我没有任何重定向,重新加载aso.在JavaScript代码中.
thx4help
饼干可能有问题吗?
shell我用htaccess文件得到的网站只被调用一次?
UPDATE
独立的访问日志是我的网站显然叫两次!! 事实上,如果我打印出一个索引,每次调用增加一个点,显示的站点只显示奇数.所以它是两步而不是一步.增量函数在代码中不会被调用两次.如果我将索引打印到文本文件,我会得到每个数字,而不仅仅是奇数.....我不知道该怎么做:-S,在哪里搜索,调试什么....
在这里我的HTML:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="icon" href="favicon.ico" type="image/x-icon">
<title>Testsuite</title>
<style type="text/css">
...
</style>
</head>
<body>
<!--script type="text/javascript">alert("go home!");</script-->
<p style="font-size: smaller; color: #555">
Testcases ID: 75<br>
Verbleibend: 94.5 % noch zu checken...<br>
</p>
<div id="action">
<h2>Suchprofile</h2>
<p>
Screen number: B01 (4)<br>
Pfad: /search/type<br><br>
</p>
</div>
<h2></h2>
<form name="testsuite" action="/index.php" method="POST">
<p style="width: 650px;">
<span style="color: gray">Ausgangassituation:</span> Der User befindet sich auf der /search/type Seite. <br>
<span style="color: gray">Eingabe:</span> Der User klickt auf ?Dieses Suchprofil speichern?. <br><br>
Reaktionen
<input type="hidden" name="id_testcase" value="75" />
</p>
<table width="650" border="1" cellspacing="0" cellpadding="0" >
<tr>
<td>Es öffnet sich ein Eingabefeld </td>
<td class="checkbox"><input type="checkbox" name="requirements[]" value="103" /></td>
</tr>
<tr>
<td>Rechts neben dem Eingabefeld wird ein Plus-Symbol angezeigt.</td>
<td class="checkbox"><input type="checkbox" name="requirements[]" value="104" /></td>
</tr>
</table>
<br>
<div style="border: 1px dashed #ccc; width: 650px; background-color: #ddd">
<input type="radio" name="action" value="skip" id="skip" /><label for="skip">Ignorieren</label><br>
<input type="radio" name="action" value="store" id="store" checked/><label for="store">Speichern</label><br>
<br>
<center>
<input type="submit" id="submitter" value="weiter" />
</center>
</div>
</form>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
您的网站确实被调用了两次,但您的索引页面只调用一次.另一个请求是查找favicon.ico,即您的浏览器将在您的页面所在的选项卡/窗口中显示的图标.
编辑: @ TokenMacGuy下面的评论可能是对的钱.
| 归档时间: |
|
| 查看次数: |
3855 次 |
| 最近记录: |