ThinkPHP database configuration file config. php-touniu blog,

Source: Internet
Author: User

ThinkPHP database configuration file config. php-touniu blog,

I found a general ThinkPHP database configuration file to connect to the database, which is relatively simple and suitable for enterprise sites and has very few configuration parameters, in this way, you can directly use the following code when creating small websites such as enterprise types.

<? Php
If (! Defined ('Think _ path') exit ();
Return $ array = array (
'Db _ type' => 'mysql ',
'Db _ host' => 'localhost ',
'Db _ name' => 'hbhongtaizhuangshi ',
'Db _ user' => 'root ',
'Db _ pwd' => 'miima ',
'Db _ port' = & gt; 3306,
'Db _ prefix' => 'zx _',
'Db _ backup' => '/Data/backup ',

'Url _ model' => 0,
);
?>

Place it in the config. php file of ThinkPHP.

 

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.