CakePHP learning problems

Source: Internet
Author: User
Problem 1: cakephpUndefinedvariable: Html may occur when $ html is called. Solution: Call this with the code: $ this-& gt; Html-& gt; link. it is also applicable to FormHelper. CakePHP learning.

23:58:22 | classification: PHP | label: php cakephp | large font size, small/medium subscription

[ReferenceHttp://book.cakephp.org] Problem highlightsProblem 1: cakephp Undefined variable: Html will occur when $ html is called. Solution: Use this to call. the code: $ this-> Html-> link is also applicable to Form Helper.
Problem 2: a project created using cakePHP has a default header and footer. solution: create default. ctp under app \ views \ layouts and define the page layout. This file will overwrite the default layout of cakePHP. You can also change css.
Knowledge points1. you can define the debug level in default. ctp, set global variables, and set cache. 2. routes. php is responsible for page routing, similar to defining the home page in web. xml. 3. define the database connection in database. php. I have to say, it is nice to use it!

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.