cipm
07-19-2007, 05:53 AM
Hi,
I tried to make a page with multiple uplaod, actualy I have 10 file inputs. I follow the instruction from http://www.php.net/manual/en/features.file-upload.multiple.php but I encountered the following problem:
- i cannot upload more then 5 files. I mean when I read $_FILES array I have only 5 elements (array size=5).
I presume that it is some default settings.. but I cannot figure where are made Sad(
Can somebody tell me where is set variable $_FILES and if I can modify the size of this?
I'll put simple code sample bellow if you run this code maybe you'll understand better what I mean.
thanks in advance,
Cipm
<?php
if (@$_REQUEST['u']=='u1') {
$dFiles = sizeof($_FILES['dFile']);
echo 'Size of array=' . $dFiles;
echo '<br/>Dislay size of files<hr/>';
for ($index = 0; $index < $dFiles; $index++) {
echo $_FILES['dFile']['size'][$index] . '<br/>';
}
}else{
echo 'Choose files:<br/>';
}
?>
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" enctype="multipart/form-data">
<input type="file" name="dFile[]" size="50" /><br/>
<input type="file" name="dFile[]" size="50" /><br/>
<input type="file" name="dFile[]" size="50" /><br/>
<input type="file" name="dFile[]" size="50" /><br/>
<input type="file" name="dFile[]" size="50" /><br/>
<input type="file" name="dFile[]" size="50" /><br/>
<input type="file" name="dFile[]" size="50" /><br/>
<input type="file" name="dFile[]" size="50" /><br/>
<input type="file" name="dFile[]" size="50" /><br/>
<input type="file" name="dFile[]" size="50" /><br/>
<input type="hidden" name="u" value="u1"/>
<input type="submit" name="sumit" value="Send"/>
</form>
I tried to make a page with multiple uplaod, actualy I have 10 file inputs. I follow the instruction from http://www.php.net/manual/en/features.file-upload.multiple.php but I encountered the following problem:
- i cannot upload more then 5 files. I mean when I read $_FILES array I have only 5 elements (array size=5).
I presume that it is some default settings.. but I cannot figure where are made Sad(
Can somebody tell me where is set variable $_FILES and if I can modify the size of this?
I'll put simple code sample bellow if you run this code maybe you'll understand better what I mean.
thanks in advance,
Cipm
<?php
if (@$_REQUEST['u']=='u1') {
$dFiles = sizeof($_FILES['dFile']);
echo 'Size of array=' . $dFiles;
echo '<br/>Dislay size of files<hr/>';
for ($index = 0; $index < $dFiles; $index++) {
echo $_FILES['dFile']['size'][$index] . '<br/>';
}
}else{
echo 'Choose files:<br/>';
}
?>
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" enctype="multipart/form-data">
<input type="file" name="dFile[]" size="50" /><br/>
<input type="file" name="dFile[]" size="50" /><br/>
<input type="file" name="dFile[]" size="50" /><br/>
<input type="file" name="dFile[]" size="50" /><br/>
<input type="file" name="dFile[]" size="50" /><br/>
<input type="file" name="dFile[]" size="50" /><br/>
<input type="file" name="dFile[]" size="50" /><br/>
<input type="file" name="dFile[]" size="50" /><br/>
<input type="file" name="dFile[]" size="50" /><br/>
<input type="file" name="dFile[]" size="50" /><br/>
<input type="hidden" name="u" value="u1"/>
<input type="submit" name="sumit" value="Send"/>
</form>