Welcome Guest, Not a member yet? Register   Sign In
please help upload file flv
#1

[eluser]jonny tran[/eluser]
Hi, please help
source:
function get_clip_add()
{

$order =$this->input->post('order');

/* upload image */
$config['upload_path'] = '../uploads/clip/';
$config['allowed_types'] = 'flv';
$config['max_size'] = '10000';
$config['max_width'] = '1024';
$config['max_height'] = '768';
$this->load->library('upload', $config);
if (!$this->upload->do_upload("image")) {
$error = array('error' => $this->upload->display_errors());
$this->session->set_userdata($error);
return false;
}
else{
$data = $this->upload->data();
$image = $data["file_name"];
}
/* end upload image */

$strquery = "insert into clip(`Clip_name`,`order`) values('$image', '$order')" ;
return $this->db->query($strquery);
}
I don't upload file flv (5M)
i config php.ini 10M
please help
#2

[eluser]Flemming[/eluser]
did you remember to set your form's enctype?

Code:
<form method="post" action="/" enctype="multipart/form-data">

or perhaps if you explain what exactly the problem is you may get more help here! Your question is a little unclear :-)




Theme © iAndrew 2016 - Forum software by © MyBB