Home  >  Article  >  php教程  >  ThinkPHP数据库配置文件config.php-途牛博客,

ThinkPHP数据库配置文件config.php-途牛博客,

WBOY
WBOYOriginal
2016-06-13 08:43:281175browse

ThinkPHP数据库配置文件config.php-途牛博客,

找了一个通用的 ThinkPHP 数据库的配置文件,用来连接数据库的,比较简单,适合企业站点,配置的参数很少,这样在建立企业类型等小网站的时候就可以直接使用了,如下代码.

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,
);
?>

将其放置到我们的 ThinkPHP 的 config.php 文件中就 ok 了。

 

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn