Skip to content
Snippets Groups Projects
Commit d0faaf37 authored by Tilman Vatteroth's avatar Tilman Vatteroth :robot:
Browse files

Less-Compiler findet jetzt selber den Pfad anstatt ihn aus einer config.php...

Less-Compiler findet jetzt selber den Pfad anstatt ihn aus einer config.php auszulesen. (wenig getestet :s)
parent afcf30c7
Branches
No related tags found
No related merge requests found
......@@ -4,4 +4,4 @@
</IfModule>
RewriteEngine on
RewriteRule ^(.*).less$ less/style.php?name=$1.less
RewriteRule ^(.*).less$ less/style.php?name=$1.less
\ No newline at end of file
<?php
const ROOT_DIR="/infoscreen";
?>
......@@ -12,9 +12,17 @@ if (!isset($_GET["name"])) {
$less_file = $_GET["name"]; //"panels/departure/style.less";
$debug=isset($_GET["debug"]);
include "config/config.php";
echo ROOT_DIR;
/*find root dir*/
$url_arr = explode("/",$_SERVER["PHP_SELF"]);
$url_arr_size = sizeof($url_arr);
$ROOT_DIR = "";
for ($i=1;$i<($url_arr_size-2);$i++)
{
$ROOT_DIR.="/".$url_arr[$i];
}
if ($debug)
echo $ROOT_DIR;
/*end finding*/
$panel = null;
......@@ -73,6 +81,6 @@ if ($debug) {
else
echo $content;
} else {
header("Location: ".ROOT_DIR."/$cache_file");
header("Location: ".$ROOT_DIR."/$cache_file");
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment