php - 404 Page Not Found related codeigniter when do upload data -
i got error '404 page not found' when try upload file in website url .
http://www.myurl.com/myfolderadmin/
but when same thing in localhost it's work well.
http://localhost/mycmsname/myfolderadmin/
this piece of controller:
function insert() { $this->form_validation->set_message('required', '*column must filled'); $this->form_validation->set_rules('judul', 'judul', 'required'); $this->form_validation->set_rules('isi', 'isi', 'required'); if ($this->form_validation->run() == false) { $this->layout->addjs('ckeditor/ckeditor.js'); $this->layout->addjs('js/admin/b267648789c30a07b0efa5bce7bdd9fe.js'); $this->layout->view('myfolderadmin/subfolder/myview'); } else { $data = array( 'title' => $this->input->post('judul'), 'content' => $this->input->post('isi'), ); $this->db->insert('newses', $data); $judul = $this->input->post('judul'); $this->load->helper('file'); $picturefiles = get_filenames('picture_news'); $this->db->select('*'); $this->db->from('newses'); $this->db->where('title', $judul); $query = $this->db->get(); foreach ($query->result() $row) { $id = $row->id; $post_date = $row->post_date; } $datapic = array( 'picturefiles' => $picturefiles, 'id' => $id, 'post_date' => $post_date, 'title' => $this->input->post('judul'), 'content' => $this->input->post('isi'), ); $this->layout->view('myfolderadmin/subfolder/myview', $datapic); //} }
}
what's wrong? how fix it?
thanks answer.
empty yout .htaccess file , add following,
rewriteengine on rewritecond $1 !^(index\.php|css|js|public|themes|captcha|robots|documents|\.txt) rewriterule ^(.*)$ /index.php/$1 [l]
hope helps you....
Comments
Post a Comment