Cake is a system developed by the United States team, everyone in the search for cake data to Google to find the information accurate! or go to the official website to look up! The official website is www.cakephp.org!
First, let's talk about why we inherited the rails advantage with cakephp!cakephp! High efficiency! Easy to maintain! Component multiple!http://bakery.cakephp.org/categories/view/ 5 These components are enough to meet your system needs! We have time to look at this site! For the interface program is easy to develop! Change the template to HTML format! After the modified support CTP and HTM two formats!
There are two more systems! Symfony and fleaphp, respectively! Symfony is foreign. fleaphp is a foreign frame! After the selection! Decide to learn and use cakephp!
Let's take a look at the structure of cake, which is the first catalogue of cake,You can see this app file! After everyone write code written in this file, cake file is a library, the bottom of the library!vendors is also a library! is a Third-party library! and the vendors in the app is corresponding! Htaccess is writing rules! Inside are some regular expressions! Let me look at the contents of the file below the app! We'll see what these files are for!This is the file below the app, these files are the files we have to set up regularly! Keep looking at these files in config!The database is generally in SQL! Open the bootstap.php file! You can set some constants for this file! For example, the skin switching function! Multiple languages also need to set the default language here! Open core.php, mainly we will make some changes here!This place! When you do not check for errors in the program, you use 2, when you are sure there is no error, you can turn off debug, change 2 to 0!This is saved session!session save format has 3, the first is saved to the database, you can set to the server! And then you can save to the cake file in the php file!我们来看这个文件!在我们下载新的cakephp源程序之后!我们户发现两个错误!第一个就是这个文件!在我们下载新的文件的以后!只需要在在后面那个值里面随便敲些代码进去!只要和原来的不一样就OK了!第二个错误就是数据库的连接 ! Then we look at 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 the views,views below is part of a page! The theme of the page needs to be built in layouts this folder result.html if there is a wrong page, Is the page that displays the error! Say 404 mistakes! It's written in errors this folder below!pages is some static page!users must correspond to controllers action, Webroot is the root directory! We uploaded the file! What JS file Ah! CSS file Ah! FCKeditor need to be placed in this folder!controllers components is where the components are placed @ is what we do on the web!