使用此代码:
<div class="form-group">
<label class="control-label col-sm-3 col-xs-12">Image</label>
<div class="col-md-6 col-sm-6 col-xs-12">
<input type="file" name="profile" class="form-control has-feedback-left">
<span class="fa fa-image form-control-feedback left" aria-hidden="true"></span>
<?=showErrors('profile')?>
</div>
</div>
当我这样做时:
print_r($_FILES);
它仅返回:-
Array
(
[profile] => Array
(
[name] => photos-gallery-canon.jpg
[type] =>
[tmp_name] =>
[error] => 1
[size] => 0
)
)