mirror of
https://github.com/codeigniter4/CodeIgniter4.git
synced 2025-02-20 11:44:28 +08:00
docs: update sample code
This commit is contained in:
parent
c92ae74900
commit
7501477180
@ -23,6 +23,7 @@ class Database extends Config
|
||||
'compress' => false,
|
||||
'strictOn' => false,
|
||||
'failover' => [],
|
||||
'port' => 3306,
|
||||
];
|
||||
|
||||
// ...
|
||||
|
@ -1,7 +1,13 @@
|
||||
<?php
|
||||
|
||||
// PDO
|
||||
$default['DSN'] = 'pgsql:host=localhost;port=5432;dbname=database_name';
|
||||
$default = [
|
||||
'DSN' => 'pgsql:host=localhost;port=5432;dbname=database_name',
|
||||
// ...
|
||||
];
|
||||
|
||||
// Oracle
|
||||
$default['DSN'] = '//localhost/XE';
|
||||
$default = [
|
||||
'DSN' => '//localhost/XE',
|
||||
// ...
|
||||
];
|
||||
|
@ -1,3 +1,6 @@
|
||||
<?php
|
||||
|
||||
$default['DSN'] = 'DBDriver://username:password@hostname:port/database';
|
||||
$default = [
|
||||
'DSN' => 'DBDriver://username:password@hostname:port/database',
|
||||
// ...
|
||||
];
|
||||
|
@ -1,6 +1,13 @@
|
||||
<?php
|
||||
|
||||
// MySQLi
|
||||
$default['DSN'] = 'MySQLi://username:password@hostname:3306/database?charset=utf8&DBCollat=utf8_general_ci';
|
||||
$default = [
|
||||
'DSN' => 'MySQLi://username:password@hostname:3306/database?charset=utf8&DBCollat=utf8_general_ci',
|
||||
// ...
|
||||
];
|
||||
|
||||
// Postgre
|
||||
$default['DSN'] = 'Postgre://username:password@hostname:5432/database?charset=utf8&connect_timeout=5&sslmode=1';
|
||||
$default = [
|
||||
'DSN' => 'Postgre://username:password@hostname:5432/database?charset=utf8&connect_timeout=5&sslmode=1',
|
||||
// ...
|
||||
];
|
||||
|
@ -1,3 +1,6 @@
|
||||
<?php
|
||||
|
||||
$default['port'] = 5432;
|
||||
$default = [
|
||||
// ...
|
||||
'port' => 5432,
|
||||
];
|
||||
|
Loading…
x
Reference in New Issue
Block a user