fix head.txt path

#142
This commit is contained in:
Tealk 2021-03-18 11:42:26 +01:00
parent d5a4beae84
commit c3fc84e0bc
No known key found for this signature in database
GPG Key ID: 5FE349ABC863E7F9
1 changed files with 3 additions and 2 deletions

View File

@ -57,8 +57,9 @@ class Template{
<head>
<?php
if(!$admin){
$headfile = fopen("head.txt", "r") or die("Unable to open head.txt!");
$head_additionalcode = fread($headfile,filesize("head.txt"));
$headpath = $_SERVER['DOCUMENT_ROOT'] . "/head.txt";
$headfile = fopen("$headpath", "r") or die("Unable to open head.txt!");
$head_additionalcode = fread($headfile,filesize($headpath));
fclose($headfile);
echo $head_additionalcode;
}