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

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

WBOY
Release: 2016-06-13 08:43:28
Original
1248 people have browsed it

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 了。

 

source:php.cn
Statement of this Website
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
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template