php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #11309 upload file
Submitted: 2001-06-06 10:16 UTC Modified: 2001-06-13 03:02 UTC
From: marszhang at jite dot net Assigned:
Status: Not a bug Package: HTTP related
PHP Version: 4.0.5 OS: redhat linux7.0
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: marszhang at jite dot net
New email:
PHP Version: OS:

 

 [2001-06-06 10:16 UTC] marszhang at jite dot net
I wrote some codes like this: 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<form action="test6.php" method="post" enctype="multipart/form-data">
        Send these files:<br>
      <input name="userfile[]" type="file"><br>
      <input name="userfile[]" type="text"><br>
      <input name="userfile[]" type="file"><br>
      <input type="submit" value="Send files">
</form>
<?php
     print_r($userfile);
?>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
But the output only had 2 elements :userfile[0],userfile[1]
,they were all file type. The text type had been lost.

I compiled php according to the INSTALL files.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-06-06 10:33 UTC] marszhang at jite dot net
codes:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<form action="test6.php" method="post"
enctype="multipart/form-data">
        Send these files:<br>
      <input name="userfile[]" type="file"><br>
      <input name="userfile[]" type="text"><br>
      <input name="userfile[]" type="file"><br>
      <input type="submit" value="Send files">
</form>
<?php
     print_r($userfile);
?>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
input:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
D:\zhangxg\06blue.gif
test
D:\zhangxg\07blue.gif
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
output:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Array ( [0] => /tmp/phpNqcZb2 [1] => /tmp/phpFR7rHQ )

 [2001-06-06 13:06 UTC] sniper@php.net
This is not bug in PHP but bug in your script.
Do not mix different types into same array.

--Jan
 [2001-06-13 03:02 UTC] marszhang at jite dot net
But I used this script in php4.0.2,it's OK!
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Thu Jul 29 20:01:24 2021 UTC