CAKEPHP basic tutorial _ PHP Tutorial

Source: Internet
Author: User
CAKEPHP basic tutorial. CAKEPHP is a system developed by the U.S. team. when you are looking for CAKEPHP materials, you can search for more accurate information by GOOGLE! Or go to the official website to check it! The official website is www.cakephp.org! First of all, CAKEPHP is a system developed by the U.S. team. when you are looking for CAKEPHP materials, GOOGLE will search for more accurate information! Or go to the official website to check it! The official website is www.cakephp.org!

First, let's discuss why CAKEPHP is used! Cakephp inherits the advantages of rails! High development efficiency! Easy to maintain! Many components! Http://bakery.cakephp.org/categories/view/5these groups are sufficient for your system needs! You have time to go to this website! Easy to develop for interface programs! Change the template to html format! The modified formats include ctp and htm!

There are two more systems! After Symfony and Fleaphp respectively! Symfony is a foreign. Fleaphp is a foreign framework! After selection! Decided to learn and use cakephp!

Let's take a look at the structure of cakephp. this is the first directory of cakephp. you can see this app file! In the future, you will write code in this file. the cake file is a library and a base Library! Vendors is also a library! Is a third-party library! It corresponds to the vendors in the app !. Htaccess is a writing rule! There are some regular expressions in it! Next let's take a look at the file content under the APP! Let's take a look at the usage of these files! This is the file under the app. these files are the files we need to set frequently! Continue to read the files in config! Databases are generally stored in SQL! Open the bootstap. php file! You can set some constants in this file! For example, the skin switch function! You also need to set the default language here for multiple languages! Open core. php. we often make some changes here! This place! When your program fails to check for errors, you can use 2. when you are sure there are no errors, you can turn off debug and change it to 0! This is to save the session! There are three session storage formats. The first is to save the session to the database, which can be set to the server! Then you can save the php file to the cake file! Let's take a look at this file! After we download the new cakephp source code! We found two errors! The first one is this file! After we download the new file! You just need to enter some code in the value that follows! As long as it is different from the original one, OK! The second error is the connection to the database! Next, let's look at how the database can be connected!
Change the database connection according to your own settings! Let's take a look at the views under the app folder. elements in views is a part of the page! Create a result.html file in the layoutsfolder. if there is an error page, it is an error page! For example, 404 error! Write it under the errors folder! Pages are some static pages! Users must correspond to the action of controllers. webroot is the root directory! Let's take the uploaded file! What JS files! CSS file! FCKEDITOR should all be placed in this folder! The components of controllers are the places where the components are placed. @ is some of the components we have online!

Success! Or go to the official website to check it! The official website is www.cakephp.org! First...

Related Article

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.