Conquer cakephp series one connected MySQL database _php tutorial

Source: Internet
Author: User
Tags vars
Read this http://www.jb51.net/article/16244.htm first.
The next step is to explain the framework.
The first is the download framework:
Official homepage: http://cakephp.org/
Download Address: http://cakeforge.org/frs/?group_id=23&release_id=428
Official Document: Http://book.cakephp.org/view/305/The-Manual
Third party introduction: http://www.1x3x.net/cakephp/
Choose a stable version here 1.1.20.7692
Download the Cake_1.1.20.7692.zip file and unzip it to create the project as shown.

Direct operation: http://localhost/cakephp_demo/

Modify the file Database.php.default file name to database.php, and modify the configuration information in it, for example:

  1. class Database_config
  2. {
  3. var $default = array(' driver ' = ' MySQL ',
  4. ' connect ' = ' mysql_connect',
  5. ' host ' = ' localhost ',
  6. ' login ' = ' root ',
  7. ' password ' = ' root ',
  8. ' database ' = ' test ',
  9. ' prefix ' = ');
  10. var $test = array(' driver ' = ' mysql ',
  11. ' connect ' = ' mysql_connect',
  12. ' host ' = ' localhost ',
  13. ' login ' = ' root ',
  14. ' password ' = ' root ',
  15. ' database ' = ' test ',
  16. ' prefix ' = ');
  17. }

Re-run the appeal URL:

This shows that the database connection is successful.

http://www.bkjia.com/PHPjc/319630.html www.bkjia.com true http://www.bkjia.com/PHPjc/319630.html techarticle Read the http://www.jb51.net/article/16244.htm first. The next step is to explain the framework. The first is the download frame: Official homepage: http://cakephp.org/download Address: ...

  • 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.