From 546924d42dec55295e2de8c3640c572e7b15af19 Mon Sep 17 00:00:00 2001 From: Subhamoy Biswas Date: Sat, 3 Feb 2024 20:00:49 +0530 Subject: [PATCH] (refactor): load environment variables only once in index --- htdocs/blog.php | 4 ---- htdocs/contact.php | 4 ---- htdocs/dmca.php | 4 ---- htdocs/home.php | 4 ---- htdocs/index.php | 4 ++++ htdocs/policy.php | 4 ---- htdocs/projects.php | 4 ---- htdocs/terms.php | 4 ---- 8 files changed, 4 insertions(+), 28 deletions(-) diff --git a/htdocs/blog.php b/htdocs/blog.php index fe2afd8..7be377e 100644 --- a/htdocs/blog.php +++ b/htdocs/blog.php @@ -1,8 +1,4 @@ load(); - require 'core/connection.php'; require 'core/host_config.php'; require 'core/query_functions.php'; diff --git a/htdocs/contact.php b/htdocs/contact.php index e99c57f..9f094aa 100644 --- a/htdocs/contact.php +++ b/htdocs/contact.php @@ -1,8 +1,4 @@ load(); - require 'core/connection.php'; require 'core/host_config.php'; require 'core/query_functions.php'; diff --git a/htdocs/dmca.php b/htdocs/dmca.php index 57480d8..de4a00e 100644 --- a/htdocs/dmca.php +++ b/htdocs/dmca.php @@ -1,8 +1,4 @@ load(); - require 'core/connection.php'; require 'core/host_config.php'; require 'core/query_functions.php'; diff --git a/htdocs/home.php b/htdocs/home.php index 0700008..3cdab68 100644 --- a/htdocs/home.php +++ b/htdocs/home.php @@ -1,8 +1,4 @@ load(); - require 'core/connection.php'; require 'core/host_config.php'; require 'core/query_functions.php'; diff --git a/htdocs/index.php b/htdocs/index.php index 5336e68..0fa9b41 100644 --- a/htdocs/index.php +++ b/htdocs/index.php @@ -1,3 +1,7 @@ load(); + require 'core/router.php'; ?> \ No newline at end of file diff --git a/htdocs/policy.php b/htdocs/policy.php index b8caf79..8e88143 100644 --- a/htdocs/policy.php +++ b/htdocs/policy.php @@ -1,8 +1,4 @@ load(); - require 'core/connection.php'; require 'core/host_config.php'; require 'core/query_functions.php'; diff --git a/htdocs/projects.php b/htdocs/projects.php index ac3bc35..ef5d2fa 100644 --- a/htdocs/projects.php +++ b/htdocs/projects.php @@ -1,8 +1,4 @@ load(); - require 'core/connection.php'; require 'core/host_config.php'; require 'core/query_functions.php'; diff --git a/htdocs/terms.php b/htdocs/terms.php index f789f98..d70b638 100644 --- a/htdocs/terms.php +++ b/htdocs/terms.php @@ -1,8 +1,4 @@ load(); - require 'core/connection.php'; require 'core/host_config.php'; require 'core/query_functions.php';