我用 html 和 php 创建了简单的多文件上传器。我在 kohana php 框架中做这件事。这是代码:
<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>
测试/测试上传代码:
print_r($_FILES);
当我尝试上传内容时,它总是显示:
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 )
)
它只是不上传。为什么?!