ZF introduces file-related issues

Source: Internet
Author: User
ZF introduces file issues
This is the controller.

Require_once application_path. ' phperror_config.php ';
Require_once Application_path. ' /models/admin.php ';


Class Admincontroller extends Zend_controller_action
{

Public Function init ()
{
/* Initialize Action Controller Here */
}

Skip to login screen
Public Function indexaction () {

}


Implement check-in function
Public Function loginaction () {

$name = $this->getrequest ()->getparam (' AdminName ');//Use the Zend method to fetch the variables in the interface
$password = $this->getrequest ()->getparam (' AdminPassword ');



Create a table model object
$adminModel =new Admin ();


Print_r ($name);
Exit ();




This is a table model.

Class Admin extends Zend_db_table {


Protected $_name= "admin";
protected $_primary= "id";




Problem in the creation of unsuccessful table model, once added require_once interface can not see is blank, or is an application error, I just self-taught this framework, do not understand Ah, ask the hero pointing Zend File Introduction Table Model

Share to:


------Solution--------------------
See for yourself if your top require_once is missing a symbol.
  • 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.