Commit 32a04ea2 authored by nuxer's avatar nuxer

LVS, PHP DBMS read/write Function 추가

parent ce83a19c
Pipeline #5098 passed with stages
in 3 seconds
......@@ -116,42 +116,6 @@ TCP 180.180.180.143:3306 wrr
![source_overview](./images/lvs-elk.png)
## PHP DBMS Connection Function
```php
<?php
//readonly 연결 함수 선언
function read_db(){
$host = "180.180.180.143";
$user = "유저아이디";
$pass = "패스워드";
$database = "디비명";
$connect = mysql_connect($host, $user, $pass) or die("ERROR!");
mysql_query("SET NAMES 'utf8'");
mysql_select_db($database, $connect);
return $connect;
}
//read/write 연결 함수 선언
function write_db(){
$host = "180.180.180.250";
$user = "유저아이디";
$pass = "패스워드";
$database = "디비명";
$connect = mysql_connect($host, $user, $pass) or die("ERROR!");
mysql_query("SET NAMES 'utf8'");
mysql_select_db($database, $connect);
return $connect;
}
?>
```
## PHP DBMS Connection Function
```php
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment