From: Michael Wallner Date: Fri, 20 Dec 2013 15:16:42 +0000 (+0100) Subject: use open_basedir X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=b0d3f3493ade54e394d598c2e07ee330f13ad58b;p=mdref%2Fmdref use open_basedir --- diff --git a/public/index.php b/public/index.php index d4518cd..23a1be2 100644 --- a/public/index.php +++ b/public/index.php @@ -3,7 +3,9 @@ define("ROOT", dirname(__DIR__)); define("REFS", getenv("REFPATH") ?: implode(PATH_SEPARATOR, glob(ROOT."/refs/*"))); -$loader = require __DIR__ . "/../vendor/autoload.php"; +ini_set("open_basedir", ROOT.":".REFS); + +$loader = require ROOT . "/vendor/autoload.php"; /* @var $loader \Composer\Autoload\ClassLoader */ $loader->add("mdref", ROOT);