Ha! I haven't been here for a long time! Today, I re-typed my keyboard! Enter the word into my BLOG! The purpose is to calculate my new learning content! Today is the first day of viewing the CAKEPHP tutorial! After reading it! What should I write! 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, 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!