ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
[TOC] ## 安装 ``` composer require verot/class.upload.php ``` 示例 ``` $handle = new \Verot\Upload\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('/home/user/files/'); if ($handle->processed) { echo 'image resized'; $handle->clean(); } else { echo 'error : ' . $handle->error; } } ```