Zendframework controller click to deliver the specified webpage and cannot access the test to obtain the array of the form. The Table model can be output normally.

Source: Internet
Author: User
When the zendframework controller clicks submit, the specified webpage cannot be accessed, and the array of the obtained form can normally output the table model. right, after clicking submit, the webpage you specified cannot be accessed! & Nbsp; error type: 500 controller code public & nbsp; function & n zend framework controller click to submit the specified webpage and cannot access the test to obtain the array of the form. The Table model can be output normally.


Click submit
The webpage you specified cannot be accessed!
Error Type: 500

Controller code
Public function additemAction (){
$ Name = $ this-> getRequest ()-> getParam ('name ');
$ Description = $ this-> getRequest ()-> getParam ('Description ');
$ Vote_count = $ this-> getRequest ()-> getParam ('vote _ count ');

/*
Echo $ name, $ description, $ vote_count;

Exit ();*/


$ Data = array (
'Name' => $ name,
'Description' => $ description,
'Vote _ count' => $ vote_count
);

 
$ ItemModel = new Item ();
$ ItemModel-> insert ($ data );
$ This-> redirect ('OK ');
}



Item. php

// Here Zend_Db_Table must be inherited; otherwise, it is not a table model.
Class Item extends Zend_Db_Table {
// The default primary key is id, which can be left empty
Protected $ _ primary = 'id ';
Protected $ _ name = 'ITEM ';


}
------ Solution --------------------
Is your database configured?
------ Solution --------------------
"The specified webpage cannot be accessed" Is there a problem with the submitted path?

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.