Fix media path

This commit is contained in:
Dennis Eichhorn 2017-05-01 14:13:12 +02:00
parent b7ceb750ec
commit 9ff1c20c78

View File

@ -43,7 +43,7 @@ echo $this->getData('nav')->render();
<?php else : ?>
<pre>
<?php
$output = htmlspecialchars(file_get_contents(ROOT_PATH . '/' . $media->getPath()));
$output = htmlspecialchars(file_get_contents(__DIR__ . '/../../../../' . $media->getPath()));
$output = str_replace(["\r\n", "\r"], "\n", $output);
$output = explode("\n", $output);
foreach($output as $line) : ?><span><?= $line; ?></span><?php endforeach; ?>