|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2002-10-10 10:10 UTC] capelli at in2p3 dot fr
In this particular form case:
<FORM METHOD=POST ACTION="test2.php" enctype="multipart/form-data">
<INPUT TYPE="text" NAME="toto[a]"><BR>
<INPUT TYPE="text" NAME="toto[b]"><BR>
<INPUT TYPE="file" NAME="toto[c]"><BR>
<INPUT TYPE="submit">
</FORM>
we expect in $_REQUEST:
Array
(
[toto] => Array
(
[a] => a
[b] => b
[c] => Array
(
[name] => apple.jpg
[type] => image/pjpeg
[tmp_name] => C:\TEMP\PHPUPLOAD\php233.tmp
[error] => 0
[size] => 24777
)
)
)
and unfortunately we get:
Array
(
[toto] => Array
(
[name] => Array
(
[c] => apple.jpg
)
[type] => Array
(
[c] => image/pjpeg
)
[tmp_name] => Array
(
[c] => C:\TEMP\PHPUPLOAD\php234.tmp
)
[error] => Array
(
[c] => 0
)
[size] => Array
(
[c] => 24777
)
)
)
.......
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 13:00:01 2025 UTC |
On Windows, I used a 4.2.1 PHP version and 2.0.39 Apache version. On SunOS, a 4.2.3 PHP version and 1.3.26 Apache version are used. The results are identical The $_POST variable is uncomplete: Array ( [toto] => Array ( [a] => a [b] => b [c] => C:\TEMP\PHPUPLOAD\php23F.tmp ) )not sure if this is important, but import_request_variables imports the wrong thing. html: <input name="d[text]" value="hello"> <input type="file" name="d[file]"> code: import_request_variables("GP", "__"); result: $__d = array ( 'name' => array ( 'file' => '' ), 'type' => array ( 'file' => '' ), 'tmp_name' => array ( 'file' => '' ), 'error' => array ( 'file' => 4 ), 'size' => array ( 'file' => 0 ) )