Here is the environment under the window to build, I assume php,apache,mysql, the basic environment are OK, if not, steal a lazy, with integrated environment, I use the wampserver.
1: Go to the official website (http://cakephp.org/) down a cakephp bag, unzip to get a folder, the directory structure is as follows:
2: Put these folders, files copy directly to Wampserver to provide us with the WWW folder
3: Let's go visit http://localhost:80/and look at it, the result might look like this:
4: Now go to configure it, find the Apache httpd.conf file Open
#LoadModule rewrite_module modules/mod_rewrite.so release this module.
5: Let's go visit http://localhost:80/and look at it, the result might look like this:
6: Next we change
Locate the core.php in the Config folder under the App folder and open the file to find these two lines:
Configure::write (' Security.salt ', ' dyhg93b0qyjfixfs2guvouubwwvnir2g0fgac9mi ');
Configure::write (' security.cipherseed ', ' 76859309657453542496749683645 ');
Get rid of the parameters of ' security.salt ' and ' security.cipherseed ', and change the characters randomly, such as
Configure::write (' Security.salt ', ' dyhg9tb0qyjfixfs2zxczzxczxcguvouubwwvnir2g0fgac9mi ');
Configure::write (' security.cipherseed ', ' 7685930965745354343242496749683645 ');
7: Then visit http://localhost:80/to see what the result might look like:
8: Next we go to cakephp database configuration, find this file database.php.default copy a change of name database.php
Open the database.php and find a place similar to the following.
classDatabase_config { Public $default=Array( ' DataSource ' = ' database/mysql ', ' persistent 'false, ' host ' = ' localhost ', ' login ' = ' user ', ' password ' = ' password ', ' database ' => ; ' database_name ', ' prefix ' = ', '//' encoding ' = ' UTF8 ', ); Public $test=Array( ' DataSource ' = ' database/mysql ', ' persistent 'false, ' host ' = ' localhost ', ' login ' = ' user ', ' password ' = ' password ', ' database ' => ; ' Test_database_name ', ' prefix ' = ', '//' encoding ' = ' UTF8 ', );}
View Code
Let's change $default this array, you should understand what's going on.
It's starting to change.
class Database_config { public$defaultarray( ' datasource ' = ') Database/mysql ', false, ' host ' = ' localhost ', ' login ' = ' root ', ' password ' = > ', ' database ' = ' test ', ' prefix ' = ', ' encoding ' = ' utf8 ', ' ;}
View Code
The reason for this change is that we are now going to the test database in the MySQL database provided by the local wampserver.
Restart the Wampserver service (remember to restart OH), and then visit http://localhost:80/:
9: This is basically green, our cakephp environment can be used. As for the following debugkit now we do not care about it, in fact, to install the Debug tool.
10: Here I use the cakephp library file address paste, do not want to go under the official website, with this also line (Http://pan.baidu.com/s/1mgjv0Ti)
and Debugkit's network address was posted (Http://pan.baidu.com/s/1qWNiRGK)
This is the most simple configuration, if you have not used, this is the introduction of cakephp, as for the use of the back to say
CakePHP's basic Environment