diff --git a/Mpdf/Mpdf.php b/Mpdf/Mpdf.php index ec3280b..1ff35d0 100755 --- a/Mpdf/Mpdf.php +++ b/Mpdf/Mpdf.php @@ -11363,8 +11363,10 @@ class Mpdf implements \Psr\Log\LoggerAwareInterface if (!$str) { if (isset($_SERVER['SCRIPT_NAME'])) { $currentPath = dirname($_SERVER['SCRIPT_NAME']); - } else { + } elseif (isset($_SERVER['PHP_SELF'])) { $currentPath = dirname($_SERVER['PHP_SELF']); + } else { + $currentPath = __DIR__ . '/../../'; } $currentPath = str_replace("\\", "/", $currentPath); if ($currentPath == '/') {