I created simple multifile uploader with html and php. I'm doing it in kohana php framework. Here's the code:
<form method="post" enctype="multipart/form-data" action="/test/test_uploader">
<input type="file" class="btn btn-mini" name="report_1" />
<input type="file" class="btn btn-mini" name="report_2" />
<input type="file" class="btn btn-mini" name="report_3" />
<button type="submit" class="btn btn-primary">Zatwierdź</button>
</form>
test/testuploader code:
print_r($_FILES);
When I try to upload something, it always shows:
Array (
[report_1] => Array ( [name] => [type] => [tmp_name] => [error] => 4 [size] => 0 )
[report_2] => Array ( [name] => [type] => [tmp_name] => [error] => 4 [size] => 0 )
[report_3] => Array ( [name] => [type] => [tmp_name] => [error] => 4 [size] => 0 )
)
It just doesn't upload. WHY?!
UPLOAD_ERR_NO_FILE Value: 4; No file was uploaded.
No file arrived at the server. Did you definitely select one to upload?
Most often I see this error when trying to upload really large files (bigger than the upload_max_filesize
and post_max_size
php settings.) What size are the files you're trying to upload?
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.