Re: Re: Error al subir ficheros jpegz

From: Date: Wed, 19 May 2004 18:08:45 +0000
Subject: Re: Re: Error al subir ficheros jpegz
References: 1 2 3  Groups: php.general.es 
Request: Send a blank email to general-es+get-48689@lists.php.net to get a copy of this message
bien, en la documentación de php pone: Since PHP 4.2.0, PHP returns an appropriate error code along with the file array. The error code can be found in the ['error'] segment of the file array that is created during the file upload by PHP. In otherwords, the error might be found in $_FILES['userfile']['error']. UPLOAD_ERR_OK Value: 0; There is no error, the file uploaded with success. UPLOAD_ERR_INI_SIZE Value: 1; The uploaded file exceeds the upload_max_filesize directive in php.ini. UPLOAD_ERR_FORM_SIZE Value: 2; The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the html form. UPLOAD_ERR_PARTIAL Value: 3; The uploaded file was only partially uploaded. UPLOAD_ERR_NO_FILE Value: 4; No file was uploaded. por lo que el error se debe (según parece) a que el tamaño es mayor que el de MAX_FILE_SIZE que debe estar en bytes, por lo que sólo permites archivos de hasta 29,29 Kb (<input type="hidden" name="MAX_FILE_SIZE" value="30000" /> y 30000/1024=29,296875). aumenta ese número y debería funcionar, en el ejemplo siguiente se pueden enviar archivos de hasta 2 Mb. Prueba si te funciona y me comentas, ok? <? $kbys=2048; $max=$kbys*1024; ?> <input type="hidden" name="MAX_FILE_SIZE" value="<?=$max?>"> Atentamente, Carlos Longarela.

« previous php.general.es (#48689) next »