로컬에서 돌아가도록 초기세팅
This commit is contained in:
parent
4ac3b5da39
commit
f68db6c7f2
|
|
@ -2,11 +2,11 @@
|
|||
|
||||
date_default_timezone_set('America/Toronto');
|
||||
|
||||
if ($_SERVER["REMOTE_ADDR"] == "127.0.0.1") {
|
||||
if ($_SERVER["REMOTE_ADDR"] == "127.0.0.1" || $_SERVER["REMOTE_ADDR"] == "::1" || str_contains($_SERVER["HTTP_HOST"], "localhost")) {
|
||||
$host = "localhost";
|
||||
$user = "ifreshy_goi";
|
||||
$pw = "L0C2CKN5GHHY";
|
||||
$dbName = "ifreshy_goi";
|
||||
$user = "goiintra_root";
|
||||
$pw = "L0C2CKN5GHHY";
|
||||
$dbName = "goiintra_db";
|
||||
} else if ($_SERVER['HTTP_HOST'] == "goi.ifreshy.com") {
|
||||
$host = "localhost";
|
||||
$user = "ifreshy_goi";
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
<?php
|
||||
|
||||
if ($_SERVER["REMOTE_ADDR"] == "127.0.0.1") {
|
||||
if ($_SERVER["REMOTE_ADDR"] == "127.0.0.1" || $_SERVER["REMOTE_ADDR"] == "::1" || str_contains($_SERVER["HTTP_HOST"], "localhost")) {
|
||||
$DB_HOST = "localhost";
|
||||
$DB_NAME = "ifreshy_goi";
|
||||
$DB_USER = "ifreshy_goi";
|
||||
$DB_NAME = "goiintra_db";
|
||||
$DB_USER = "goiintra_root";
|
||||
$DB_PASSWORD = "L0C2CKN5GHHY";
|
||||
|
||||
if ($pdo = new PDO('mysql:host=localhost;dbname=ifreshy_goi', $DB_USER, $DB_PASSWORD))
|
||||
if ($pdo = new PDO('mysql:host=localhost;dbname=goiintra_db', $DB_USER, $DB_PASSWORD))
|
||||
{echo "";}else{echo "bad news";}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ include getenv("DOCUMENT_ROOT")."/include/session_include.php";
|
|||
|
||||
$confirmID = trim($_POST['confirmID']);
|
||||
$confirmPW = $_POST['confirmPW'];
|
||||
$action = $_POST['action'] ?? $_GET['action'] ?? '';
|
||||
|
||||
if($action == "login") {
|
||||
|
||||
|
|
@ -34,7 +35,7 @@ if($action == "login") {
|
|||
}
|
||||
|
||||
|
||||
if ($_SERVER["REMOTE_ADDR"] == "127.0.0.1") {
|
||||
if ($_SERVER["REMOTE_ADDR"] == "127.0.0.1" || $_SERVER["REMOTE_ADDR"] == "::1") {
|
||||
$res['success'] = 1;
|
||||
}
|
||||
else {
|
||||
|
|
|
|||
Loading…
Reference in New Issue