Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (!empty($_FILES['avariaFoto']['name'])) {
- $files = array();
- foreach($_FILES['avariaFoto'] as $k => $l) {
- foreach($l as $i => $v) {
- if (!array_key_exists($i, $files)) $files[$i] = array();
- $files[$i][$k] = $v;
- }
- }
- foreach($files as $file) {
- $handle = new upload($file);
- if ($handle - > uploaded) {
- $handle - > file_new_name_body = date('dmYhis');
- $handle - > image_resize = true;
- $handle - > image_x = 800;
- $handle - > image_ratio_y = true;
- $handle - > jpeg_quality = 75;
- $handle - > image_convert = 'jpg';
- $handle - > file_overwrite = false;
- $handle - > file_auto_rename = true;
- $handle - > mime_check = true;
- $handle - > Process('imagens/');
- $foto = $handle - > file_dst_name;
- if ($handle - > processed) {
- $handle - > clean();
- } else {
- echo ' Erro: '.$handle - > error.
- '';
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement