php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #45649 IE header not send #url
Submitted: 2008-07-29 01:24 UTC Modified: 2008-07-30 00:53 UTC
From: xiefei dot admin at gmail dot com Assigned:
Status: Not a bug Package: PHP options/info functions
PHP Version: 5.2.6 OS: header
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: xiefei dot admin at gmail dot com
New email:
PHP Version: OS:

 

 [2008-07-29 01:24 UTC] 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

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-07-29 01:27 UTC] xiefei dot admin at gmail dot com
form enctype is multipart/form-data
 [2008-07-29 17:21 UTC] lbarnaud@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

This is browser dependent. The browser do not have to send the #hash while sending HTTP request (e.g. if you add #123 to the address of a page you are viewing, the browser will not refresh the page, it will just scroll to the element named "123").
 [2008-07-30 00:53 UTC] xiefei dot admin at gmail dot com
thinks , This is IE bug
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Tue Jul 08 03:01:32 2025 UTC