1
Hi, I'm trying to upload a file for my module but I'm not getting past through the basics.
This is the code I have:
<?php include_once ('admin_header.php'); if(!isset($_POST['pulsacion'])){ $parseForm = new XoopsThemeForm('Enviar archivo de estadísticas', 'parse_form', 'prueba_parse.php'); $parseForm->AddElement(new XoopsFormFile('Enviar fichero','envio', 1000000)); $parseForm->AddElement(new XoopsFormButton('', 'pulsacion', 'Enviar', 'submit')); $parseForm->display(); } else{ print_r($_POST); echo "<br><br>"; print_r($_FILES); } xoops_cp_footer(); ?>
And this is the output I get when I try to upload a file:
le="color: #000000"><?php Array ( [MAX_FILE_SIZE] => 1000000 [envio] => 2007-02-19_23.46.39_results_race.zip [xoops_upload_file] => Array ( [0] => envio ) [pulsacion] => Enviar ) Array ( )
I've tried different mime types but it won't work with any. Maybe this is just a basic php mistake I'm having, but I don't know where is the problem. I think the $_FILES array should have the file info after I submit the form.
Can anyone help me?