PHP code example of lsys / upload
1. Go to this page and download the library: Download lsys/upload library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
lsys / upload example snippets
//参考:dome/upload.php
use LSYS\Config\File;
use LSYS\Upload\Image;
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);
}