php file upload class instance that can generate thumbnails,
The example in this article describes the file upload class and its usage that can generate thumbnails in PHP. Share it with everyone for your reference. The specific implementation method is as follows:
The class file calling method is as follows:
Copy code The code is as follows:
if ($_GET['action'] == 'save') {
$up = new upload(); $up = new upload();
$up->set_dir(dirname(__FILE__).'/upload/','{y}/{m}');
$up->set_thumb(100,80); $up->set_thumb(100,80);
$up->set_watermark(dirname(__FILE__).'/jblog/images/watermark.png',6,90);
$fs = $up->execute(); $fs = $up->execute();
var_dump($fs); var_dump($fs);
}
?>
test