Read the http://www.jb51.net/article/16244.htm first.
The framework is then explained Step-by-step.
The first is the download framework:
Official homepage: http://cakephp.org/
Download Address: http://cakeforge.org/frs/?group_id=23&release_id=428
Official documents: http://book.cakephp.org/view/305/The-Manual
Third party Introduction: http://www.1x3x.net/cakephp/
Select Stable version here
1.1.20.7692
Download Cake_1.1.20.7692.zipFile and unzip the project as shown in the following figure.
Direct operation:http://localhost/cakephp_demo/
Modify the file Database.php.default file name is database.php and modify the configuration information in it, for example:
- Class Database_config
- {
- var $default = array(' driver ' => ' mysql '),
- ' Connect ' => ' mysql_connect ',
- ' host ' => ' localhost ',
- ' login ' => ' root ',
- ' password ' => ' root ',
- ' database ' => ' test ',
- ' prefix ' => ' );
- var $test = array(' driver ' => ' mysql '),
- ' Connect ' => ' mysql_connect ',
- ' host ' => ' localhost ',
- ' login ' => ' root ',
- ' password ' => ' root ',
- ' database ' => ' test ',
- ' prefix ' => ' );
- }
Rerun the appeal URL:
It is visible that the database connection succeeded at this time.