当前位置: 动力学知识库 > 问答 > 编程问答 >

html - fileupload is not working for php

问题描述:

File upload value not commming for all values :

print_r($_FILES);

returns :

Array ( [file] => Array (

[name] => IMG_20150905_160429690.jpg

[type] => [tmp_name] => [error] => 1 [size] => 0 ))

This is my HTML :

<form form action="profilepic_original_photo.php" method="post" enctype="multipart/form-data" class="form-horizontal" style="margin-top: 20px;">

<div class="form-group">

<label class="control-label col-xs-3">File Upload</label>

<div class="col-md-9">

<div class="fileupload fileupload-new" data-provides="fileupload">

<div class="input-append">

<div class="uneditable-input">

<!--<i class="fa fa-file fileupload-exists"></i>-->

<span class="fileupload-preview"></span>

</div>

<span class="btn btn-default btn-file">

<span class="fileupload-exists">Change</span>

<span class="fileupload-new">Select file</span>

<input type="file" name="file" required>

</span>

<a href="#" class="btn btn-default fileupload-exists" data-dismiss="fileupload">Remove</a>

</div>

</div>

</div>

</div>

</form>

网友答案:

Well, [error] => 1, http://php.net/manual/en/features.file-upload.errors.php says:

Value: 1; The uploaded file exceeds the upload_max_filesize directive in php.ini

分享给朋友:
您可能感兴趣的文章:
随机阅读: