No se que demonios pasa, necesito hacer un upload de imagenes y tengo el siguiente código pero no me funciona...
<form method="POST" action = "CLASS/PoC.php" enctype="multipart/form-data">
<b>IMAGEN: </b> <input type="file" id = "txtIMG" name = "txtIMG"><br>
<input type="submit">
</form>
<?php
print $_FILES['txtIMG']['tmp_name']."<br>";
print $_FILES['txtIMG']['name']."<br>";
if(move_uploaded_file($_FILES['txtIMG']['tmp_name'], "/var/www/admin/CATEGORIA/".$_FILES['txtIMG']['name'])){
print "SI";
}else{
print "NO";
}
?>
Ahora si copia pero sólo con archivos pequeños....
checate esto
http://foro.elhacker.net/php/subir_un_fichero_y_relacionarlo_en_la_base_de_datos-t327903.0.html
Que tiene de diferente a lo que yo tengo? :¬¬
Cita de: Shell Root en 8 Junio 2011, 19:41 PM
Que tiene de diferente a lo que yo tengo? :¬¬
que el mio si sube el archivo :laugh:
Cita de: RedZer en 8 Junio 2011, 20:54 PM
que el mio si sube el archivo :laugh:
jajajaja, como me has echo reir :laugh: :laugh: ;-) :laugh: :laugh:
Cita de: RedZer en 8 Junio 2011, 20:54 PM
que el mio si sube el archivo :laugh:
El mio tambien, :silbar: sólo que no con imágenes de gran tamaño.
Comprueba que tal tienes todas estas variables en el
PHP.ini .
- upload_max_filesize
- max_input_time
- post_max_size
Saludos
De 2MB le subi a 20MB pero no, sigue sin funcionar...
seria bueno si el sistema te da un tipo error ver cual es?
CitarUPLOAD_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.
UPLOAD_ERR_NO_TMP_DIR
Value: 6; Missing a temporary folder. Introduced in PHP 4.3.10 and PHP 5.0.3.
UPLOAD_ERR_CANT_WRITE
Value: 7; Failed to write file to disk. Introduced in PHP 5.1.0.
UPLOAD_ERR_EXTENSION
Value: 8; A PHP extension stopped the file upload. PHP does not provide a way to ascertain which extension caused the file upload to stop; examining the list of loaded extensions with phpinfo() may help. Introduced in PHP 5.2.0.