当我尝试上传文件大小为MB的图像时。仅返回文件名,但不返回文件大小....(在PHP中)

时间:2018-09-19 09:49:45

标签: php file

使用此代码:

       <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
        )

)

0 个答案:

没有答案