The CI button submits an issue that expresses the action connection path expressed by the query database
This post was last edited by huaipiqi_net on 2015-05-27 13:08:10
I have just started to learn CI, today in a small program, the process is the text box to enter the student name, button click Submit after the query database of how many points the student tested
Now the problem is that I have no problem with the local test, but after uploading to the server, I am prompted that the error is
404 Page Not Found
The page you requested is not found.
I think it should be the address of the action submitted wrong, please help me to answer the thank you
My form form is written like this.
My model Code is
Class Getdb_model extends Ci_model {
Public Function GetResult ()
{
/* Combine SQL statements here */
/* $cname = $this->input->post (' cname ');
$cert = $this->input->post (' Ccert ');
Print_r ($cname);
Print_r ($cert);
*/
$cname = $this->input->post (' cname ');
$cname _item = ' username ';
$data = $this->db->where (Array (' username ' = + $cname))->get (' Exam_resu ')->result_array ();
return $data;
}
}
My controller model is
Defined (' BasePath ') or exit (' No Direct script access allowed ');
Class GetResult extends ci_controller{
Public Function Index ()
{
$this->load->model (' Getdb_model ', ' get ');
$data [' CJ ']= $this->get->getresult ();
/* Call a view below */
$this->load->view (' result ', $data);
}
}
The code of the view where I finally showed the result is
Student Name |
Ticket Number |
Single Choice |
Multi-choice |
Blank questions |
Drawing questions |
Brief answer |
Calculation questions |
Test questions |
Score |
|
|
|
|
|
|
|
|
|
|
------to solve the idea----------------------
------to solve the idea----------------------
After the output, is the address of the action correct? If it is correct, do you use Urlrewrite? is the urlrewrite on the server configured correctly?
------to solve the idea----------------------
No domain name, there is a path on the line! The Domain browser will fill in