Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
academy-lms
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Phạm Văn Đoan
academy-lms
Commits
0b730c0a
Commit
0b730c0a
authored
Feb 21, 2020
by
Phạm Văn Đoan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
code thêm đoạn check môi trường để kết nối db
parent
4bd6e0eb
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
4 deletions
+17
-4
database.php
application/config/database.php
+17
-4
No files found.
application/config/database.php
View file @
0b730c0a
...
@@ -73,12 +73,25 @@ defined('BASEPATH') OR exit('No direct script access allowed');
...
@@ -73,12 +73,25 @@ defined('BASEPATH') OR exit('No direct script access allowed');
$active_group
=
'default'
;
$active_group
=
'default'
;
$query_builder
=
TRUE
;
$query_builder
=
TRUE
;
/* doanpv - code thêm đoạn check môi trường localhost và server */
if
(
in_array
(
$_SERVER
[
'HTTP_HOST'
],
[
'localhost'
]))
{
$db_hostname
=
'localhost'
;
$db_username
=
'root'
;
$db_password
=
''
;
$db_database
=
'academy_lms'
;
}
else
{
$db_hostname
=
'10.10.0.36'
;
$db_username
=
'academy_lms'
;
$db_password
=
'x85z@wUgC2pp9qJ'
;
$db_database
=
'academy_lms'
;
}
$db
[
'default'
]
=
array
(
$db
[
'default'
]
=
array
(
'dsn'
=>
''
,
'dsn'
=>
''
,
'hostname'
=>
'localhost'
,
'hostname'
=>
$db_hostname
,
'username'
=>
'root'
,
'username'
=>
$db_username
,
'password'
=>
''
,
'password'
=>
$db_password
,
'database'
=>
'academy_lms'
,
'database'
=>
$db_database
,
'dbdriver'
=>
'mysqli'
,
'dbdriver'
=>
'mysqli'
,
'dbprefix'
=>
''
,
'dbprefix'
=>
''
,
'pconnect'
=>
FALSE
,
'pconnect'
=>
FALSE
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment