[eluser]jonny tran[/eluser]
code:
function get_clip_add()
{
$order =$this->input->post('order');
/* upload image */
$config = array();
$config['upload_path'] = '../uploads/clip/';
$config['allowed_types'] = 'mp3|swf|flv';
$config['max_size'] = '150000';
//$config['max_width'] = '1024';
//$config['max_height'] = '768';
//$config['max_size'] = '0';
$config['remove_spaces']= TRUE;
// $config['encrypt_name'] = TRUE;
$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 */
//echo $config;
$strquery = "insert into clip_en(`Clip_name`,`order`) values('$image', '$order')" ;
return $this->db->query($strquery);
}
uploaded the locahost be uploaded to the server but is not. 711 clips folder configuration.