2017 © Pedro Peláez
 

library database

数据库连接

image

hutong/database

数据库连接

  • Thursday, May 24, 2018
  • by HuTong
  • Repository
  • 1 Watchers
  • 1 Stars
  • 235 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 38 % Grown

The README.md

database

yaf 配置模式

数据库连接 多库连接配置
;数据库配置信息
database.default.driver     = "mysql"
database.default.type       = "Pdos"
database.default.host       = "127.0.0.1"
database.default.name       = "yaf"
database.default.user       = "root"
database.default.password   = "root"
database.default.port       = 3306
database.default.charset    = utf8
;other
database.other.driver     = "mysql"
database.other.type       = "Pdos"
database.other.host       = "127.0.0.1"
database.other.name       = "other"
database.other.user       = "root"
database.other.password   = "root"
database.other.port       = 3306
database.other.charset    = utf8

常量配置模式

array(
    'default' => array(
        'driver' => 'mysql',
        'type' => 'Pdos',
        'host' => '127.0.0.1',
        'name' => 'yaf',
        'user' => 'root',
        'password' => 'root',
        'port' => '3306',
        'charset' => 'utf8'
    ),
    'other' => array(
        'driver'    => 'mysql',
        'type'      => 'Pdos',
        'host'      => '127.0.0.1',
        'name'      => 'other',
        'user'      => 'root',
        'password'  => 'root',
        'port'      => '3306',
        'charset'   => 'utf8'
    )
)

学习交流群

630730920, (*1)

The Versions

24/05 2018

dev-master

9999999-dev

数据库连接

  Sources   Download

MIT

The Requires

  • php >=7.0.0

 

by Avatar HuTong