Blogger Information
Blog 65
fans 1
comment 1
visits 118975
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
tp5.1 文件上传 提示文件未上传!
技术宅的博客
Original
4733 people have browsed it
$file    = request()->file('');
if(!empty($file)){
    $info = $file['pphoto']->validate([
        'size' => 1567800000,
        'ext'  => 'jpg,png,gif,jpeg',
    ])->move('uploads');
    if ($info) {
        $newData['pphoto'] = "uploads\\" . $info->getSaveName();
    } else {
        _alert_back($file->getError());
    }
}
需要这样写  $info = $file['pphoto']  才不会报 文件未上传


Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post