joomla 1.6

public function upload() { $data['content']='upload'; $this->load->view('include/layout',$data); } public function do_upload() { $config['upload_path'] = 'upload'; $config['allowed_types'] = 'jpg|jpeg|png'; $config['max_size'] = 1024*1024; $this->load->library('upload', $config); if (!$this->upload->do_upload('kml')) { $data['content'] = 'upload'; $this->load->view('include/layout',$data); } else { redirect(base_url()); } } //widok