Skip to content

Latest commit

 

History

History
18 lines (17 loc) · 476 Bytes

Upload.md

File metadata and controls

18 lines (17 loc) · 476 Bytes

上传 Upload

$handle = Helper::upload($_FILES['image_field']);
if ($handle->uploaded) {
    $handle->file_new_name_body = 'image_resized';
    $handle->image_resize = true;
    $handle->image_x = 100;
    $handle->image_ratio_y = true;
    $handle->process(dirname(__DIR__) . '/data/temp/image');
    if ($handle->processed) {
        $handle->clean();
    } else {
        $this->fail($handle->error);
    }
}
文档 https://github.com/verot/class.upload.php