The CI button submits a question about the action connection path expressed by the query database

Source: Internet
Author: User
Tags php foreach
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
 
  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.