当我尝试在我的网站 url 中上传文件时,出现错误“404 Page Not Found”。
http://www.myurl.com/myfolderadmin/
但是当我在 localhost 中做同样的事情时,它工作得很好。
http://localhost/mycmsname/myfolderadmin/
这是我的控制器的一部分:
function insert() {
$this->form_validation->set_message('required', '*column must be 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() as $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);
//}
}
}
怎么了?我该如何解决?
感谢你的回答。