introducir el código aquí
if (isset($_POST['enviar'])){
$fileTemp = $_FILES['file']['tmp_name'];
$fileName = $_FILES['file']['name'];
$fileSize = $_FILES['file']['size'];
$fileType = $_FILES['file']['type'];
if ($fileSize > 1000000) {
$_SESSION['error'] = "El tamaño del archivo no debe ser mayor a 1 MB. ";
header('Location: ../vista/form.php');
}
if ( $fileType != "image/jpeg" ) {
$_SESSION['error'] = "El archivo a subir debe estar en formato JPG.";
header('Location: ../vista/form.php');
}
if (empty($_POST['cta'])) {
$_SESSION['error'] = "Debe seleccionar un tipo de cuenta.";
header('Location: ../vista/form.php');
}
//qibm/UserData/WebSphere/AppServer/V7/Express/profiles/WAS70SVR/sbi/sbi.ear/sbi.war/FirmasAH
$servidor = ftp_connect("xx.xx.xx.xx");
$usuarioFtp = ftp_login($servidor, "nbrusquett","xxxx");
if ((!$servidor) || (!$usuarioFtp)) {
$_SESSION['error'] = "Error en la conexión. "; die;
header('Location: ../vista/form.php');
}
ftp_pasv ($servidor, true);
ftp_chdir($servidor, "/qibm/UserData/WebSphere/AppServer/V7/Express/profiles/WAS70SVR/sbi/sbi.ear/sbi.war/FirmasAH/");
$ruta = "/qibm/UserData/WebSphere/AppServer/V7/Express/profiles/WAS70SVR/sbi/sbi.ear/sbi.war/FirmasAH/".$fileName;
if (is_uploaded_file($fileTemp)){
if (move_uploaded_file($fileTemp, $ruta)) {
$_SESSION['error'] = "Registro de firma cargado correctamente.";
header('Location: ../vista/form.php');
};
}
else {
$_SESSION['error'] = "No se pudo copiar el archivo.";
header('Location: ../vista/form.php');
}
ftp_close($servidor);
}
?> Tienen alguna idea de que podria estar mal? El error que tengo es:
Warning: move_uploaded_file(/qibm/UserData/WebSphere/AppServer/V7/Express/profiles/WAS70SVR/sbi/sbi.ear/sbi.war/FirmasAH/nbrusquett.JPG): failed to open stream: No such file or directory in C:\xampp\htdocs\CargaRegistroDeFirmas\controlador\cargaFirma.php on line 58 Warning: move_uploaded_file(): Unable to move 'C:\xampp\tmp\php7957.tmp' to '/qibm/UserData/WebSphere/AppServer/V7/Express/profiles/WAS70SVR/sbi/sbi.ear/sbi.war/FirmasAH/nbrusquett.JPG' in C:\xampp\htdocs\CargaRegistroDeFirmas\controlador\cargaFirma.php on line 58