ID: 45649
User updated by: xiefei dot admin at gmail dot com
Reported By: xiefei dot admin at gmail dot com
Status: Open
Bug Type: PHP options/info functions
Operating System: header
PHP Version: 5.2.6
New Comment:
form enctype is multipart/form-data
Previous Comments:
------------------------------------------------------------------------
[2008-07-29 01:24:09] xiefei dot admin at gmail dot com
Description:
------------
when I upload file but header in ie not have #url, in firefox header
#url are have , if you remove <input type="file" name="good" /> the name
,then header have #123 ,if not remove name then header the url not have
#123,why?
Reproduce code:
---------------
in ie not have #123
<?php
$a =$_POST['a'];
if($a) {
header("location:/a/w#123");
}
?>
<!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>Untitled Document</title>
</head>
<body>
<form id="reply_form" action="" method="post"
enctype="application/x-www-form-urlencoded">
<input type="file" name="good" />
<input type="text" name="a" value="123" />
<input name="submitw" type="submit" class="btn" value=" " />
</body>
</html>
ie have #123
<?php
$a =$_POST['a'];
if($a) {
header("location:/a/w#123");
}
?>
<!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>Untitled Document</title>
</head>
<body>
<form id="reply_form" action="" method="post"
enctype="application/x-www-form-urlencoded">
<input type="file" />
<input type="text" name="a" value="123" />
<input name="submitw" type="submit" class="btn" value=" " />
</body>
</html>
Expected result:
----------------
/a/w#123
Actual result:
--------------
/a/w
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=45649&edit=1