Beginner cakephp Basic Tutorial _php Tutorial

Source: Internet
Author: User
CakePHP is a system developed by the United States team, we are looking for cakephp data to Google search for accurate information! Or go to the official website to check! Official site is www.cakephp.org!

First of all, let's talk about why we use cakephp!cakephp to inherit the advantages of rails! High development efficiency! Easy to maintain! Component Multi-!http://bakery.cakephp.org/categories/view/ 5 These components are sufficient to meet the needs of your system! have time to go to this site to see! Easy to develop for interface programs! Change the template to HTML format! After the modified support CTP and HTM two formats!

There are two systems! Symfony and fleaphp! Symfony is a foreign country. Fleaphp is a framework abroad! After selection! Decide to learn and use cakephp!

Let's look at CakePHP's structure, this is CakePHP's first directory, you can see this app file! After we write the code is written in this file, cake file is a library, the base library!vendors is also a library! is a third-party library! And the app inside the vendors is corresponding!. Htaccess is the write rule! There are some regular expressions in there! Let's look at the file contents below the app! Here are some of the files we'll be looking at! This is the file under the app, these files are the files we want to set up regularly! Keep looking at these files in config! The database is usually placed in SQL! Open bootstap.php file! You can set some constants for this file! For example, the skin switch function! Multiple languages also need to set the default language here! Open core.php, mainly we often do some changes here! This place! When your program error check error, you use 2, when you are sure there is no error, you can turn off debug, change 2 to 0! This is the Save Session!session Save format has 3, the first is to save to the database, can be set to the server! And then you can save the PHP file in the cake file! Let's look at this file! After we download the new cakephp source program! We found two bugs! The first one is this file! After we download the new file! Just take some code in the back of that value! As long as the original is not the same as OK! The second error is the database connection! Then we'll see how the database should be connected!
Change the database connection according to your own settings! Let's take a look at the app folder. The elements in Views,views below is part of a page! The theme of the page needs to be in layouts this folder to build a result.html if there is a wrong page, is to display the wrong page! For example, 404 error! Just write in errors this folder!pages is some static page!users must and controllers action want to correspond, Webroot is the root directory! We put the uploaded file Ah! What JS file Ah! CSS file Ah! FCKeditor need to be put in this folder. The components of!controllers are the parts that we put on the web.

http://www.bkjia.com/PHPjc/320894.html www.bkjia.com true http://www.bkjia.com/PHPjc/320894.html techarticle CakePHP is a system developed by the United States team, we are looking for cakephp data to Google search for accurate information! Or go to the official website to check! The official site is www.cakephp.org! First of all ...

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