![]() |
Problem with upload file - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Problem with upload file (/showthread.php?tid=22684) |
Problem with upload file - El Forum - 09-17-2009 [eluser]Browser[/eluser] echo form_open_multipart("principal/colaborar_envio/"); $nombre = array ( "name" => "titulo", "id" => "titulo", "maxlength" => "64", "size" => "25", ); $archivo = array ( "name" => "archivo", "id" => "archivo", "maxlength" => "64", "size" => "25", ); $descripcion = array ( "name" => "descripcion", "id" => "descripcion", "rows" => "10", "cols" => "40", ); echo "<div align='center'><table><tr><td>Título</td><td>".form_input($nombre)."</td></tr>"; echo "<tr><td>Idioma</td><td>"; ?> <select name="myselect"> <option value="one" <?php echo set_select('myselect', 'Frances', TRUE); ?> >Francés</option> <option value="two" <?php echo set_select('myselect', 'Ingles'); ?> >Ingés</option> <option value="three" <?php echo set_select('myselect', 'Espanol'); ?> >Español</option> </select> <? echo "</td></tr>"; echo "<tr><td>Archivo</td><td>".form_upload($archivo)."</td></tr>"; echo "<tr><td>Información</td><td>".form_textarea($descripcion)."</td></tr><tr><td>".form_submit("submit","Enviar")."</td></tr></table></div>"; echo form_close(); ///// And the controlador colaborar_envio() $fichero_server = $_FILES['archivo']['tmp_name']; This line give error, why? I cannot use $_FILES ![]() Problem with upload file - El Forum - 09-17-2009 [eluser]nicholas.byfleet[/eluser] There is a great page in the user guide that shows you how to deal with file uploading.... here's a link: http://ellislab.com/codeigniter/user-guide/libraries/file_uploading.html Hope this helps. Also, you can always run a phpinfo(); for debugging. Problem with upload file - El Forum - 09-17-2009 [eluser]Browser[/eluser] Thanks you. |