gest366/modules/tipi_documenti/modutil.php

19 lines
375 B
PHP
Raw Permalink Normal View History

2021-02-24 20:40:04 +00:00
<?php
/**
* Crea le thumbnails di $filename da dentro $dir e le salva in $dir
*/
function create_logo( $tmp, $filename, $dir ){
$f = pathinfo( $filename );
$name = $f['filename'];
$ext = strtolower($f['extension']);
$photo = new Photo( array("name" => $name.".".$ext, "tmp_name" => $tmp) );
$photo->doResize( 302, $dir."/" );
return true;
}
?>