diff --git a/includes/functions.php b/includes/functions.php index 055f750e..75a6c3cd 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -578,9 +578,9 @@ function SaveTORAndVPNConfig() /** * Renders a simple PHP template */ -function renderTemplate($name, $data) +function renderTemplate($name, $data = []) { - $file = "../../templates/$name.php"; + $file = realpath(dirname(__FILE__) . "/../templates/$name.php"); if (!file_exists($file)) { return "template $name ($file) not found"; }