Re[2]: [PHP-ES] Re: Error al subir ficheros jpegz

From: Date: Thu, 20 May 2004 15:58:46 +0000
Subject: Re[2]: [PHP-ES] Re: Error al subir ficheros jpegz
References: 1 2 3 4  Groups: php.general.es 
Request: Send a blank email to general-es+get-48715@lists.php.net to get a copy of this message
Tenías razón, he modificado el tamaño del fichero en el formulario y me funciona, muchas gracias. Perdonad por una pregunta tan estúpida, pero me moviendo con el manual castellano y la versión es distinta y no he visto la descripción de los errores ---- Un saludo, Aitzi mail@aitziberhernandez.com ------------->>>>>>>>>>>>>>>>>------------- miércoles, 19 de mayo de 2004, 20:08:45, escribiste: CL> bien, en la documentación de php pone: CL> Since PHP 4.2.0, PHP returns an appropriate error code along with the file CL> array. The error code can be found in the ['error'] segment of the file CL> array that is created during the file upload by PHP. In otherwords, the CL> error might be found in $_FILES['userfile']['error']. CL> UPLOAD_ERR_OK CL> Value: 0; There is no error, the file uploaded with success. CL> UPLOAD_ERR_INI_SIZE CL> Value: 1; The uploaded file exceeds the CL> upload_max_filesize directive in CL> php.ini. CL> UPLOAD_ERR_FORM_SIZE CL> Value: 2; The uploaded file exceeds the MAX_FILE_SIZE directive that was CL> specified in the html form. CL> UPLOAD_ERR_PARTIAL CL> Value: 3; The uploaded file was only partially uploaded. CL> UPLOAD_ERR_NO_FILE CL> Value: 4; No file was uploaded. CL> por lo que el error se debe (según parece) a que el tamaño es mayor que el CL> de MAX_FILE_SIZE que debe estar en bytes, por lo que sólo permites archivos CL> de hasta 29,29 Kb (<input type="hidden" name="MAX_FILE_SIZE" CL> value="30000" />> y 30000/1024=29,296875). aumenta ese número y debería funcionar, en el CL> ejemplo siguiente se pueden enviar archivos de hasta 2 Mb. CL> Prueba si te funciona y me comentas, ok? CL> <? CL> $kbys=2048; CL> $max=$kbys*1024; ?>> CL> <input type="hidden" name="MAX_FILE_SIZE" CL> value="<?=$max?>"> CL> Atentamente, Carlos Longarela.

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