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
 [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-2024 The PHP Group
All rights reserved.
Last updated: Wed Apr 24 23:01:34 2024 UTC