Zend Controller How to call the file inside the Model folder

Source: Internet
Author: User
How the Zend controller calls the files inside the Model folder
The book says that the class in the Model folder can be instantiated directly in the controller without the need to reference the file, but I did not find the class file after the error, ask what is the problem?

Share to:


------Solution--------------------
The name of the model and action does not correspond well, because the framework is automatically based on the __class__ to search the corresponding model, you look at the framework requirements.
------Solution--------------------
In addition to the home page: the name of the other model class is also the name of the action method


------Solution--------------------
Your path is not written, for example, if your db.php is placed under the Model->db folder, your class name should be called Class db_db. I think you're just having this problem.
------Solution--------------------
Instructions on how to use model
http://blog.csdn.net/mengxiangbaidu/article/details/7680729
http://blog.csdn.net/mengxiangbaidu/article/details/7680742

  • 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.