이 질문을하기 전에 시도했지만 충분한 정보를 제공하지 못했습니다. 자세한 내용은 여기에 있습니다. 방문자에게 양식의 코드화 된 문자열을 입력하도록 요청한 호스팅 사이트의 페이지가 있습니다. 제출되면 코드는 파일 이름을 만들고 텍스트 파일에서 간단한 데이터를 가져옵니다.IE7 및 IE8에서 사이트가 예기치 않게 리디렉션 됨
모든 것이 FF 및 Safari에서 제대로 작동하지만 인터넷 익스플로러 7 및 인터넷 익스플로러 8에서 이것을 테스트 할 때 방문자가 제출되면 방문자는 사이트 홈 페이지로 리디렉션됩니다.
이 같은 예기치 않은 리디렉션이 사이트의 다른 위치에서 발생합니다. 여기서 문제를 격리 할 수 있다면 다른 인스턴스를 수정할 수 있기를 바랍니다. 당신은 같은 줄에 FORM 요소를 폐쇄하고
<?php
session_start();
ob_start;
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Advisor Survey - 2012 Predictive Questions</title>
<link href="css/surv_ver2.css" rel="stylesheet" type="text/css" media="screen" />
<link href="css/s_table.css" rel="stylesheet" type="text/css" media="screen" />
</head>
<body>
<div id="header">
</div> <!-- close header -->
<div id="wrapper">
<div id="mid_cont">
<div id="mid_left">
</div> <!-- close mid_left -->
<div id="mid_col">
<div id="mid_col_inner">
<h2 class="p_head">Scoring Details</h2>
<p class="p_text">Want to learn more about how your site compares to others in your market? We employed tools to evaluate your web site from a high-level marketing perspective.</p>
<p class="p_text">All of our sample tests mimic search engine functionality. Check our site to see where your score falls in the overall Denver market.</p>
</div> <!-- close mid_col_inner -->
</div> <!-- close mid_col -->
<div id="mid_center">
<div id="top_cent">
<img src="images/revenue_subhead.png" />
</div> <!-- close top_cent -->
<div id="mid_cent">
<p class="mid_col_text">Enter the code (no punctuation or spaces) from our communication with you to see your score.</p>
</div> <!-- close mid_cent -->
<div id="bot_cent">
<div id="bot_left">
<form method="POST" action="<?php $_SERVER['PHP_SELF'] ?> " />
<label id="label2">Enter code: </label>
<input type="text" name="code" id="code" />
<input type="submit" name="submit" id="code_submit" />
</form>
</div> <!-- close bot_left -->
<div id="bot_right">
<?php
if (($_POST['submit']) and (empty($_POST['code']))) {
echo "<br/><br/>";
print "<p class=\"spl_p\"> Please select choice!</p>";
}
if (!empty($_POST['code'])) {
$response = $_POST['code'];
echo $response;
$test_name = $response . ".txt";
$test_name = "../id_advisors/$test_name";
if (!file_exists($test_name)) {
echo "Please re-enter code!";
exit();
}
}
if (!empty($_POST['code'])) {
echo $test_name;
// read in the details of the file for each firm
$pointer = fopen("../id_advisors/$test_name", "r");
$data_line = fgets($pointer, 1096);
fclose($pointer);
$file_array = explode("\t", $data_line);
foreach ($file_array as $item) {
$item = $file_array;
$firm_name = $file_array[0];
$mkt_id = $file_array[1];
$site_id = $file_array[2];
$score = $file_array[3];
$pages = $file_array[4];
$traffic_rank = $file_array[5];
$in_links = $file_array[6];
$start_date = $file_array[7];
}
}
?>
<table id="form_2" cellpadding="-3">
<tr><td width="100">Firm name: </td><td><input type="text" name="f_name" id="f-name" value="<?php echo $firm_name; ?>" /></td></tr>
<tr><td width="100">Market ID: </td><td><input type="text" name="mkt" id="mkt" value="<?php echo $mkt_id; ?>" /></td></tr>
<tr><td width="100">URL : </td><td><input type="text" name="url" id="url" value="<?php echo $site_id; ?>" /></td></tr>
<tr><td width="100">Score: </td><td><input type="text" name="score" id="score" value="<?php echo $score; ?>" /></td></tr>
<tr><td width="100">Index pages: </td><td><input type="text" name="pages" id="pages" value="<?php echo $pages; ?>" /></td></tr>
<tr><td width="100">Traffic: </td><td><input type="text" name="traff" id="traff" value="<?php echo $traffic_rank; ?>" /></td></tr>
<tr><td width="100">Inbound links: </td><td><input type="text" name="i_links" id="i_links" value="<?php echo $in_links; ?>" /></td></tr>
<tr><td width="100">Test date: </td><td><input type="text" name="t_date" id="t_date" value="<?php echo $start_date; ?>" /></td></tr>
</table>
</div> <!-- close bot_right -->
</div> <!-- close bot_cent -->
</div> <!-- close mid_left -->
<div id="mid_right">
</div> <!-- close mid_left -->
</div> <!-- close mid_cont -->
<div id="footer">
</div> <!-- footer -->
<div id="sub_foot">
<p>Copyright 2012 | Lighthouse Pacific Group, LLC - All Rights Reserved</p>
</div> <!-- close sub_foot -->
</div> <!-- close wrapper -->
</body>
</html>
mason81 - 제안 해 주셔서 감사합니다. 나는 그것을 고치고 사이트를 테스트했다. - 제출시 홈 페이지로 리다이렉트하고있다. - 나는 이것에 대해 가벼운 우울증을 시작하고있다! – twood
좋아, 두 번째 봐서 나는 문제를 본다. 당신은 실제로 액션을 반향하지 않았고 action = ""으로 나타났습니다. Firefox/Safari에서는 액션이 공백이지만 IE가 루트가되는 경우 동일한 페이지를 사용해야하므로 분명히 문제가 아닙니다. 위의 편집 된 답변을 시도하십시오. – mason81
또한 첫 번째?>와 mason81