Welcome Guest, Not a member yet? Register   Sign In
Problem with upload file
#1

[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>";
?&gt;
<select name="myselect">
<option value="one" &lt;?php echo set_select('myselect', 'Frances', TRUE); ?&gt; >Francés</option>
<option value="two" &lt;?php echo set_select('myselect', 'Ingles'); ?&gt; >Ingés</option>
<option value="three" &lt;?php echo set_select('myselect', 'Espanol'); ?&gt; >Español</option>
</select>
&lt;?
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 Sad
#2

[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.
#3

[eluser]Browser[/eluser]
Thanks you.




Theme © iAndrew 2016 - Forum software by © MyBB