Commit b7f47e7f authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Fix for guessing wwwroot on windows server (bug 3320)


Signed-off-by: default avatarRichard Mansfield <richardm@catalyst.net.nz>
parent 04bed9aa
......@@ -166,6 +166,7 @@ if (!isset($CFG->wwwroot) && isset($_SERVER['HTTP_HOST'])) {
}
$path = substr(dirname(__FILE__), strlen($_SERVER['DOCUMENT_ROOT']));
if ($path) {
$path = str_replace('\\', '/', $path); // windows
if (substr($path, 0, 1) != '/') {
$path = '/' . $path;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment