Problem with upload file |
[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 ![]()
[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-gui...ading.html Hope this helps. Also, you can always run a phpinfo(); for debugging.
|
Welcome Guest, Not a member yet? Register Sign In |