I have been fighting with an annoying problem for couple days.. If I try to
upload more than 22 files (no matter what size), the last file doesn't
upload correctly..
I don't know PHP very well, so I don't know whether there is a way to
configure the server to get around the problem...
In the beginning I thought it was a problem with the java applet that is
used to upload the files, but then I tested with a normal html form (below)
and problem was still there, so I'm assuming it's PHP (I've tested it with
both Win/IIS and Linux/Apache configurations)..
I have the following piece of code to test the feature... The output lists
all the files, but the last file doesn't have size set (name is correct
though) and the copy function gives an error...
<form action="upload_result.php" method="POST"
enctype="multipart/form-data">
File 1: <input name="file1" type="file"><br>
File 2: <input name="file2" type="file"><br>
File 3: <input name="file3" type="file"><br>
File 4: <input name="file4" type="file"><br>
File 5: <input name="file5" type="file"><br>
File 6: <input name="file6" type="file"><br>
File 7: <input name="file7" type="file"><br>
File 8: <input name="file8" type="file"><br>
File 9: <input name="file9" type="file"><br>
File 10: <input name="file10" type="file"><br>
File 11: <input name="file11" type="file"><br>
File 12: <input name="file12" type="file"><br>
File 13: <input name="file13" type="file"><br>
File 14: <input name="file14" type="file"><br>
File 15: <input name="file15" type="file"><br>
File 16: <input name="file16" type="file"><br>
File 17: <input name="file17" type="file"><br>
File 18: <input name="file18" type="file"><br>
File 19: <input name="file19" type="file"><br>
File 20: <input name="file20" type="file"><br>
File 21: <input name="file21" type="file"><br>
File 22: <input name="file22" type="file"><br>
File 23: <input name="file23" type="file"><br>
File 24: <input name="file24" type="file"><br>
<input type="submit">
</form>
and in the receiving side there is the following code
<?
$filedir = "c:\\filestorage\\";
$count = 1;
foreach ( $HTTP_POST_FILES as $file ) {
$filename = $file['name'];
$filesize = $file['size'];
echo "File name $filename? size: $filesize<br>\n";
copy($file['tmp_name'], $filedir.$count.".jpg");
$count++;
}
?>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]