lsys / upload
lsys module upload
0.0.1
2020-07-29 06:27 UTC
Requires
- lsys/config: ~0.0.1
This package is auto-updated.
Last update: 2024-11-29 05:39:04 UTC
README
使用示例:
//参考:dome/upload.php
use LSYS\Config\File;
use LSYS\Upload\Image;
include __DIR__."/Bootstarp.php";
if (!isset($_FILES['file']))die();
$file=$_FILES['file'];
$config= new File("upload.dome_image");
$upload = new Image($file,$config);
$filename=$upload->save("ddd".$upload->get_ext());
if ($filename===false){
print_r($upload->errors());
}else{
var_dump($filename);
}