服务器地址修改
parent
dc5772d6f6
commit
849c5b40d2
|
@ -12,7 +12,7 @@ class Config
|
||||||
* Database host
|
* Database host
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
const DB_HOST = '117.50.176.114';
|
const DB_HOST = '117.50.187.222';
|
||||||
/**
|
/**
|
||||||
* Database name
|
* Database name
|
||||||
* @var string
|
* @var string
|
||||||
|
@ -29,7 +29,7 @@ class Config
|
||||||
* Database password
|
* Database password
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
const DB_PASSWORD = '12345678';
|
const DB_PASSWORD = 'zhengcaiyu123';
|
||||||
/**
|
/**
|
||||||
* Show or hide error messages on screen
|
* Show or hide error messages on screen
|
||||||
* @var boolean
|
* @var boolean
|
||||||
|
|
|
@ -57,7 +57,7 @@ abstract class Model
|
||||||
if ($db === null) {
|
if ($db === null) {
|
||||||
$dsn = "";
|
$dsn = "";
|
||||||
if($_SERVER['HTTP_HOST'] == '127.0.0.1')
|
if($_SERVER['HTTP_HOST'] == '127.0.0.1')
|
||||||
$dsn = 'mysql:host=117.50.176.114' . ';dbname=' . Config::DB_NAME . ';charset=utf8';
|
$dsn = 'mysql:host=117.50.187.222' . ';dbname=' . Config::DB_NAME . ';charset=utf8';
|
||||||
else
|
else
|
||||||
$dsn = 'mysql:host=127.0.0.1' . ';dbname=' . Config::DB_NAME . ';charset=utf8';
|
$dsn = 'mysql:host=127.0.0.1' . ';dbname=' . Config::DB_NAME . ';charset=utf8';
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"require": {
|
"require": {
|
||||||
"twig/twig": "~2.0",
|
"twig/twig": "~3.0",
|
||||||
"propel/propel": "~2.0@dev",
|
"propel/propel": "~2.0@dev",
|
||||||
"erusev/parsedown": "^1.7",
|
"erusev/parsedown": "^1.7",
|
||||||
"benjaminhoegh/parsedown-toc": "^1.4"
|
"benjaminhoegh/parsedown-toc": "^1.4"
|
||||||
|
@ -23,6 +23,6 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"contributte/nextras-orm-generator": "^0.2.0"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
rm ../code.tar.gz
|
rm ../code.tar.gz
|
||||||
del ../code.tar.gz
|
del ../code.tar.gz
|
||||||
tar.exe -czf ../code.tar.gz ./*
|
tar.exe -czf ../code.tar.gz ./*
|
||||||
scp -i ./id_rsa ../code.tar.gz ubuntu@117.50.176.114:/home/ubuntu/
|
scp -i ./id_rsa_s ../code.tar.gz ubuntu@117.50.187.222:/home/ubuntu/
|
||||||
ssh -t -i ./id_rsa ubuntu@117.50.176.114 sudo tar -zxvf /home/ubuntu/code.tar.gz -C /var/www/html/api/
|
ssh -t -i ./id_rsa_s ubuntu@117.50.187.222 sudo tar -zxvf /home/ubuntu/code.tar.gz -C /var/www/html/api/
|
||||||
ssh -t -i ./id_rsa ubuntu@117.50.176.114 sudo rm /home/ubuntu/code.tar.gz
|
ssh -t -i ./id_rsa_s ubuntu@117.50.187.222 sudo rm /home/ubuntu/code.tar.gz
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -49,7 +49,6 @@ if($_SERVER['HTTP_HOST'] == '117.50.176.114'){
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
try{
|
try{
|
||||||
//for prefight request
|
//for prefight request
|
||||||
if($_SERVER['REQUEST_METHOD'] == 'OPTIONS'){
|
if($_SERVER['REQUEST_METHOD'] == 'OPTIONS'){
|
||||||
|
@ -60,7 +59,6 @@ try{
|
||||||
//print "";
|
//print "";
|
||||||
return;
|
return;
|
||||||
}else{
|
}else{
|
||||||
//print_r($_SERVER['REQUEST_URI'],\App\Config::ROUTE_PREFIX_DEV);
|
|
||||||
$router->dispatch($_SERVER['REQUEST_URI']);
|
$router->dispatch($_SERVER['REQUEST_URI']);
|
||||||
}
|
}
|
||||||
}catch (Exception $exception){
|
}catch (Exception $exception){
|
||||||
|
|
Loading…
Reference in New Issue