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