mirror of
https://github.com/neosubhamoy/neosubhamoy-portfolio.git
synced 2025-12-20 01:09:35 +05:30
(refactor): replaced hardcoded dev server ip with dynamic localIP
This commit is contained in:
@@ -1,11 +1,12 @@
|
|||||||
<?php
|
<?php
|
||||||
$currentHost = $_SERVER['HTTP_HOST'];
|
$currentHost = $_SERVER['HTTP_HOST'];
|
||||||
|
$localIP = $_ENV['LOCAL_IP'];
|
||||||
|
|
||||||
if($currentHost == "localhost") {
|
if($currentHost == "localhost") {
|
||||||
$basePath = "https://localhost/neosubhamoy/htdocs";
|
$basePath = "https://localhost/neosubhamoy/htdocs";
|
||||||
}
|
}
|
||||||
elseif ($currentHost == "192.168.29.177") {
|
elseif ($currentHost == $localIP) {
|
||||||
$basePath = "https://192.168.29.177/neosubhamoy/htdocs";
|
$basePath = "https://" . $localIP . "/neosubhamoy/htdocs";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$basePath = "https://" . $currentHost;
|
$basePath = "https://" . $currentHost;
|
||||||
|
|||||||
Reference in New Issue
Block a user