Skip to content

Commit 2025e3c

Browse files
author
James Wigger
committed
Removed reliance on document_root
1 parent caa27d4 commit 2025e3c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

helpers.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@
1010
if (!function_exists('public_path')) {
1111
function public_path($path = '')
1212
{
13-
return $_SERVER['DOCUMENT_ROOT'] . ($path ? '/' . trim($path, '/') : $path);
13+
$basePath = realpath(__DIR__ . '/../../../');
14+
$userPath = realpath($basePath . ($path ? '/' . trim($path, '/') : $path));
15+
16+
return $userPath;
1417
}
1518
}
1619

0 commit comments

Comments
 (0)