Date: 07/11/01
- Next message: Phil Driscoll: "Re: [PHP-DEV] Re: Documentation problem"
- Previous message: lenar: "[PHP-DEV] Re: Bug #12040: PHP dumps core when using a 3x derived class from a series of included files"
- Next in thread: jeroen <email protected>: "[PHP-DEV] Bug #12060 Updated: $userfile['name'][0] not set !"
- Reply: jeroen <email protected>: "[PHP-DEV] Bug #12060 Updated: $userfile['name'][0] not set !"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
From: afortaleza <email protected>
Operating system: Linux 2.4.5
PHP version: 4.0.6
PHP Bug Type: Arrays related
Bug description: $userfile['name'][0] not set !
http://www.php.net/manual/en/features.file-upload.multiple.php
says that:
"For instance, assume that the filenames
/home/test/review.html and /home/test/xwp.out are
submitted. In this case, $userfile_name[0] would contain
the value review.html, and $userfile_name[1] would contain
the value xwp.out. Similarly, $userfile_size[0] would
contain review.html's filesize, and so forth.
$userfile['name'][0], $userfile['tmp_name'][0],
$userfile['size'][0], and $userfile['type'][0] are also
set. "
But they are not set !
Here's the script that requites 2 pages, form.html and
file-upload.php
form.php
========
<html>
<head></head>
<body>
<form action="file-upload.php" method="post"
enctype="multipart/form-data">
Send these files:<br>
<input name="userfile[]" type="file"><br>
<input name="userfile[]" type="file"><br>
<input type="submit" value="Send files">
</form>
</body>
</html>
file-upload.php
===============
<?php
// We will not upload, just show the variables
print_r ( $HTTP_POST_FILES );
print_r ( $userfile );
?>
You will notice that $userfile is a one dimensional array
that contains only the names of the temporary files
uploaded.
My PHP is:
==========
./configure
Anderson Fortaleza
-- Edit bug report at: http://bugs.php.net/?id=12060&edit=1-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Phil Driscoll: "Re: [PHP-DEV] Re: Documentation problem"
- Previous message: lenar: "[PHP-DEV] Re: Bug #12040: PHP dumps core when using a 3x derived class from a series of included files"
- Next in thread: jeroen <email protected>: "[PHP-DEV] Bug #12060 Updated: $userfile['name'][0] not set !"
- Reply: jeroen <email protected>: "[PHP-DEV] Bug #12060 Updated: $userfile['name'][0] not set !"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

