lsys/upload

lsys module upload

0.0.1 2020-07-29 06:27 UTC

This package is auto-updated.

Last update: 2022-04-29 00:56:48 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);
}