Código:
Envio el dato de File con el metodo post a otra hoja, estoy usando la clase Upload, para subir la imagen a mi servidor... probe con estos dos codigos:<form method="post" action="../../Controller/avatarControl.php?nu=1"><br/> Nombre a Mostrar: <input type ="text" name="detalle"/>(ej: Google )<br/> Url(direccion web): <input type ="text" name="url"/>(ej: Google.com )<br/> Letra Inicial(minus): <input type ="text" name="letra" maxlength="1"/>(ej: g )<br/> Nombre Img avatar: <input type ="text" name="nombre_avatar"/> (ej: google_A.jpg)<br/> Cargar Avatar (Img): <input name="avatar" type="file"/><br/> <br/> <input type ="submit" value="Guardar"/> </form>
Código:
y con este otro:include_once 'class.upload_0.31/class.upload.php'; $imagen = new upload ($_FILES['avatar']); if ($imagen->uploaded){ $imagen->process('UI/Images/avatars'); $foto = 'UI/Images/avatars/'. $imagen->file_dst_name; }
Código:
El problema es que no anda de ninguna de las dos maneras, alguien sabe donde puede estar el error??? saludos y gracias! include_once 'class.upload_0.31/class.upload.php'; $imagen = new upload ($_POST['avatar']); if ($imagen->uploaded){ $imagen->process('UI/Images/avatars'); $foto = 'UI/Images/avatars/'. $imagen->file_dst_name; }