note 35274 added to features.file-upload
| From: | nunc at rack1 dot php dot net | Date: | Tue, 26 Aug 2003 09:55:49 +0000 |
| Subject: | note 35274 added to features.file-upload | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-55090@lists.php.net to get a copy of this message | ||
<form method="POST" enctype="multipart/form-data">
<input type="file" name="f[1][file]">
<input type="file" name="f[2][file]">
[...]
</form>
If you Upload something like this, you get differnt Array Structures in differents PHP/Apache
versions.
In PHP Version 4.0.4pl1 + Apache/1.3.11 you get
Array
(
[f] => Array
(
[1] => Array
(
[name] => Array
(
[file] => abc.jpg
)
[type] => Array
(
[file] => image/pjpeg
)
[tmp_name] => Array
(
[file] => /tmp/phpgfiwgY
)
[size] => Array
(
[file] => 5061
)
)
[2] => Array
(
[name] => Array
(
[file] => cba.jpg
)
[type] => Array
(
[file] => image/pjpeg
)
[tmp_name] => Array
(
[file] => /tmp/phpgfiwzY
)
[size] => Array
(
[file] => 5062
)
)
)
)
In PHP Version 4.3.1-dev + Apache/1.3.27 you get
Array
(
[f] => Array
(
[name] => Array
(
[1] => Array
(
[file] => abc.jpg
)
[2] => Array
(
[file] => cba.jpg
)
)
[type] => Array
(
[1] => Array
(
[file] => image/pjpeg
)
[2] => Array
(
[file] => image/pjpeg
)
)
[tmp_name] => Array
(
[1] => Array
(
[file] => /tmp/php9fiYjF
)
[2] => Array
(
[file] => /tmp/php9fiYzF
)
)
[error] => Array
(
[1] => Array
(
[file] => 0
)
[2] => Array
(
[file] => 0
)
)
[size] => Array
(
[1] => Array
(
[file] => 5061
)
[2] => Array
(
[file] => 5062
)
)
)
)
So, the same script might not run under every platform the same way.
----
Manual Page -- http://www.php.net/manual/en/features.file-upload.php
Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+35274
Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+35274&report=yes
Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+35274&report=yes