From ce921e8169a1b8b657a553ac6883fda22ffd2776 Mon Sep 17 00:00:00 2001 From: Jonathan Rosenbaum Date: Sat, 15 Jul 2017 18:48:34 +0000 Subject: [PATCH] Added realpath so that included files work properly. --- Connections/YBDB.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Connections/YBDB.php b/Connections/YBDB.php index fbd40cc..6bc89dd 100644 --- a/Connections/YBDB.php +++ b/Connections/YBDB.php @@ -8,9 +8,8 @@ $hostname_YBDB = "enter_hostname"; $database_YBDB = "enter_schema"; $username_YBDB = "enter_username"; $password_YBDB = "enter_password"; -if(file_exists('Connections/local_configurations.php')) { +if(file_exists( realpath($_SERVER["DOCUMENT_ROOT"]) . "/Connections/local_configurations.php")) { require_once('local_configurations.php'); } $YBDB = mysql_pconnect($hostname_YBDB, $username_YBDB, $password_YBDB) or trigger_error(mysql_error(),E_USER_ERROR); - ?>