Wystąpił błąd: folder z newsami nie został odnaleziony.
Sprawdź, czy lokalizacja ustawiona w pliku config/config.php
jest poprawna.
';
// *******
// METHODS
// *******
function showNews($path) {
global $parsedown;
$files = array_diff(scandir($path), array('..', '.'));
foreach ($files as $newsFile) {
if(!endsWith($newsFile, ".md"))
continue;
$file = readFileContent($path . "/" . $newsFile);
$lines = explode("\n", $file);
$title = $lines[0];
$author = $lines[1];
$text = implode("\n", array_slice($lines, 3));
generateNewsBox($title, $author, $parsedown->text($text));
}
}
function generateNewsBox($title, $author, $text) { ?>
= 0 && strpos($haystack, $needle, $temp) !== false);
}
require_once __DIR__ . "/include/footer.php";
?>