04/01/2010, 19:03
|
| | Fecha de Ingreso: enero-2010
Mensajes: 127
Antigüedad: 14 años, 10 meses Puntos: 2 | |
Respuesta: Problema Upload File mira solo haz este cambio en tu codigo y ya (Arriba me equivoque UTILIZA ESTE):
$name = $_FILES ["translationFile1"] ["name"];
$size = $_FILES ["translationFile1"] ["size"] / 1024;
$tmpFile = $_FILES ["translationFile1"] ["tmp_name"];
$type=explode(".",$name); // hacemos un explode para sacar la extension.
switch($type[1]) {
case 'pdf':
$query_uploadDir = "SELECT * FROM tDocSumary WHERE DocType = 'PDF'";
break;
case 'docx':
$query_uploadDir = "SELECT * FROM tDocSumary WHERE DocType = 'DOCX'";
break;
case 'doc':
$query_uploadDir = "SELECT * FROM tDocSumary WHERE DocType = 'DOC'";
break;
case 'odt':
$query_uploadDir = "SELECT * FROM tDocSumary WHERE DocType = 'ODT'";
break;
default:
//error
$infoMsg = "Il documento si è tentato di caricare non era un documento ODT, PDF, né Word"; // ($type, $size kB)
break;
}
te lo simplifique y acomode. |