From 8ee4336d778b2bdc1b8ba522d9251a4f664fe664 Mon Sep 17 00:00:00 2001 From: Camil Staps Date: Mon, 1 Aug 2016 11:30:19 +0200 Subject: Require paths --- conf.php | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'conf.php') diff --git a/conf.php b/conf.php index 4754a6d..66e366d 100644 --- a/conf.php +++ b/conf.php @@ -33,10 +33,10 @@ ini_set('display_errors', 0); set_include_path(dirname(__FILE__) . PATH_SEPARATOR . get_include_path()); -require_once('conf.private.php'); +require_once(__DIR__ . '/conf.private.php'); spl_autoload_register(function ($pClass) { - $path = dirname(__FILE__) . "/classes/$pClass.php"; + $path = __DIR__ . "/classes/$pClass.php"; if (file_exists($path)) { require_once($path); } @@ -52,14 +52,12 @@ try { } if (BRAINTREE_ENABLED) { - require_once('modules/braintree/lib/Braintree.php'); + require_once(__DIR__ . '/modules/braintree/lib/Braintree.php'); Braintree_Configuration::environment(BRAINTREE_ENVIRONMENT); Braintree_Configuration::merchantId(BRAINTREE_MERCHANT); Braintree_Configuration::publicKey(BRAINTREE_KEY_PUBLIC); Braintree_Configuration::privateKey(BRAINTREE_KEY_PRIVATE); - - require_once('modules/PHPMailer/PHPMailerAutoload.php'); } -require_once('classes/Calculatable.php'); // Some definitions that are required +require_once(__DIR__ . '/modules/PHPMailer/PHPMailerAutoload.php'); -- cgit v1.2.3