1
1
mirror of https://github.com/neosubhamoy/neosubhamoy-portfolio.git synced 2025-12-19 08:52:59 +05:30

(refactor): replaced hardcoded dev server ip with dynamic localIP

This commit is contained in:
2024-02-03 19:28:00 +05:30
parent d573c5299c
commit 00672c84f4

View File

@@ -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;