コード例 #1
0
                    } else {
                        $nomb = $_FILES['inp_file']['name'];
                    }
                    try {
                        move_uploaded_file($_FILES['inp_file']['tmp_name'], $url . time() . $nomb);
                        array_push($array_nombre, time() . $nomb);
                        array_push($err, "no_error");
                    } catch (Exception $ext) {
                        array_push($err, $ext);
                    }
                }
            }
        }
        if (isset($array_nombre)) {
            if (count($array_nombre) >= 2) {
                $respon = $destino->Set_fotos($response['last_cod_id'], $array_nombre[0], $array_nombre[1]);
            } else {
                $respon = $destino->Set_fotos($response['last_cod_id'], $array_nombre[0], null);
            }
            $data['error'] = $err;
        }
    }
    echo json_encode($data);
}
/////////////////////////////////////////////////////////////////////////////////////////////////////
if (isset($_POST['id'], $_POST["txt_title2"], $_POST["txt_subtitle2"])) {
    include_once "../Model/Lugares.php";
    $title = $_POST["txt_title2"];
    $subtitle = $_POST["txt_subtitle2"];
    $descrip = $_POST["txt_descrip2"];
    $id = $_POST['id'];