mirror of
https://github.com/neosubhamoy/neosubhamoy-portfolio.git
synced 2025-12-20 02:19:34 +05:30
(refactor): changed router file path (feat): added global host config
This commit is contained in:
@@ -10,7 +10,7 @@ function isPageActive($pageName) {
|
|||||||
|
|
||||||
<nav class="w-full flex justify-between items-center py-5 lg:py-9 px-4 lg:px-[3.5rem]">
|
<nav class="w-full flex justify-between items-center py-5 lg:py-9 px-4 lg:px-[3.5rem]">
|
||||||
<div class="logo ml-2 lg:ml-4">
|
<div class="logo ml-2 lg:ml-4">
|
||||||
<a class="font-cormorant text-4xl font-bold" href="index.php">Subhamoy</a>
|
<a class="font-cormorant text-4xl font-bold" href="<?php echo $basePath?>">Subhamoy</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="widemenu mr-4 hidden lg:block">
|
<div class="widemenu mr-4 hidden lg:block">
|
||||||
<a class="mx-5 py-[0.30rem] relative group" href="projects.php">
|
<a class="mx-5 py-[0.30rem] relative group" href="projects.php">
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
require './core/connection.php';
|
require './core/connection.php';
|
||||||
|
require './core/host_config.php';
|
||||||
require './core/query_functions.php';
|
require './core/query_functions.php';
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
require './core/connection.php';
|
require './core/connection.php';
|
||||||
|
require './core/host_config.php';
|
||||||
require './core/query_functions.php';
|
require './core/query_functions.php';
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|||||||
10
htdocs/core/host_config.php
Normal file
10
htdocs/core/host_config.php
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
<?php
|
||||||
|
$currentHost = $_SERVER['HTTP_HOST'];
|
||||||
|
|
||||||
|
if($currentHost == "localhost") {
|
||||||
|
$basePath = "https://localhost/neosubhamoy/htdocs";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$basePath = "https://" + $host;
|
||||||
|
}
|
||||||
|
?>
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
require './core/connection.php';
|
require './core/connection.php';
|
||||||
|
require './core/host_config.php';
|
||||||
require './core/query_functions.php';
|
require './core/query_functions.php';
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
<?php
|
<?php
|
||||||
require 'Router.php';
|
require './core/router.php';
|
||||||
?>
|
?>
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
require './core/connection.php';
|
require './core/connection.php';
|
||||||
|
require './core/host_config.php';
|
||||||
require './core/query_functions.php';
|
require './core/query_functions.php';
|
||||||
|
|
||||||
$years = create_project_years_array($conn);
|
$years = create_project_years_array($conn);
|
||||||
|
|||||||
Reference in New Issue
Block a user