Ejemplo n.º 1
0
 $objProductoEntidad->setCaracter($caracteristicas);
 if (!empty($_FILES['fileFoto1']['tmp_name'])) {
     $uploaded_files_location = '../../fotos/';
     //This is the directory where uploaded files are saved on your server
     $final_location = $uploaded_files_location . basename($_FILES['fileFoto1']['name']);
     move_uploaded_file($_FILES['fileFoto1']['tmp_name'], $final_location);
     $objProductoEntidad->setFoto1("fotos/" . $_FILES['fileFoto1']['name']);
 } else {
     $objProductoEntidad->setFoto1($sTmpFoto1);
 }
 if (!empty($_FILES['fileFoto2']['tmp_name'])) {
     $uploaded_files_location = '../../fotos/';
     //This is the directory where uploaded files are saved on your server
     $final_location = $uploaded_files_location . basename($_FILES['fileFoto2']['name']);
     move_uploaded_file($_FILES['fileFoto2']['tmp_name'], $final_location);
     $objProductoEntidad->setFoto2("fotos/" . $_FILES['fileFoto2']['name']);
 } else {
     $objProductoEntidad->setFoto2($sTmpFoto2);
 }
 if (!empty($_FILES['fileFoto3']['tmp_name'])) {
     $uploaded_files_location = '../../fotos/';
     //This is the directory where uploaded files are saved on your server
     $final_location = $uploaded_files_location . basename($_FILES['fileFoto3']['name']);
     move_uploaded_file($_FILES['fileFoto3']['tmp_name'], $final_location);
     $objProductoEntidad->setFoto3("fotos/" . $_FILES['fileFoto3']['name']);
 } else {
     $objProductoEntidad->setFoto3($sTmpFoto3);
 }
 if (!empty($_FILES['fileFoto4']['tmp_name'])) {
     $uploaded_files_location = '../../fichas/';
     //This is the directory where uploaded files are saved on your server