Home > Article > Backend Development > ThinkPHP database configuration file configphp-Tuniu Blog
I found a general ThinkPHP database configuration file, which is used to connect to the database. It is relatively simple and suitable for corporate sites. There are very few configuration parameters, so that it can be used directly when building small corporate websites, such as the following code.
if(!defined('THINK_PATH')) exit();
return $array = array (
'DB_TYPE' => 'mysql',
'DB_HOST' => 'localhost',
'DB_NAME' => 'hbhongtaizhuangshi',
'DB_USER' => 'root',
'DB_PWD' => 'meimimaa',
'DB_PORT' => 3306,
'DB_PREFIX' => ' zx_',
'DB_BACKUP' => '/Data/backup',
'URL_MODEL' => 0,
);
?>
Place it in our ThinkPHP config.php file OK.
The above introduces the ThinkPHP database configuration file configphp-tuniu blog, including the content. I hope it will be helpful to friends who are interested in PHP tutorials.