Use realpath for ROOT to allow symlinks to mkht.php

This commit is contained in:
Miraty 2024-02-10 14:07:47 +01:00
parent a13aadc3c7
commit 66df795d25

View file

@ -5,7 +5,7 @@ if (php_sapi_name() !== 'cli')
umask(0022);
const LF = "\n";
define('ROOT', dirname($_SERVER['SCRIPT_FILENAME']));
define('ROOT', dirname(realpath($_SERVER['SCRIPT_FILENAME'])));
if (!extension_loaded('tidy'))
echo 'PHP tidy extension unavailable. Feature disabled.' . PHP_EOL;