Joriku
Working in the mines, need something?
Hi,
so the init.php inside the engine folder contains the sub page catagory.
Now, I want to create a folder called wiki and add pages that allows access onto them by entering either the file by the domain or else do something like the sub page does by using sub.php?page=name
How would I do this?
Current progress:
init.php
Issue I am encountering by entering domain.com/wiki.php?page=wiki.php
is 404 error, not found.
the file lays inside
layout/wiki/wiki.php
so the init.php inside the engine folder contains the sub page catagory.
Now, I want to create a folder called wiki and add pages that allows access onto them by entering either the file by the domain or else do something like the sub page does by using sub.php?page=name
How would I do this?
Current progress:
init.php
Lua:
// Wiki sub pages
$filename2 = basename($_SERVER['REQUEST_URI']);
$page_filename2 = pathinfo($filename2, PATHINFO_FILENAME);
if ($config['allowWikiPages']) {
$wikiDirectory = 'layout/wiki/';
$requestedFile = $wikiDirectory . $page_filename2 . '.php';
// Check if the requested file exists
if (file_exists($requestedFile)) {
require_once 'layout/overall/header.php';
require_once $requestedFile;
require_once 'layout/overall/footer.php';
exit;
} else {
// Handle case when the requested wiki page file does not exist
?>
<div style="background-color: white; padding: 20px; width: 100%; float:left;">
<h2 style="color: black;">Wiki page not found!</h2>
<p style="color: black;">The requested page does not exist.</p>
</div>
<?php
}
}
Issue I am encountering by entering domain.com/wiki.php?page=wiki.php
is 404 error, not found.
the file lays inside
layout/wiki/wiki.php