forked from I2P_Developers/i2p.www
Fixed two bugs that show up with some PHP configurations:
* Use of undefined constant MENU_FILE - assumed 'MENU_FILE' (added quotes) * Cannot modify header information - headers already sent (extra newlines at the end of menu.php) (ugha)
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
<?php
|
||||
include('menu.php');
|
||||
|
||||
define(MENU_FILE,'menu.ini');
|
||||
define(PAGE_DIR,'pages/');
|
||||
define(PAGE_EXT,'.html');
|
||||
define('MENU_FILE','menu.ini');
|
||||
define('PAGE_DIR','pages/');
|
||||
define('PAGE_EXT','.html');
|
||||
|
||||
/* Filter out everything except alphanumerical characters and underscores */
|
||||
function form_filter($data) {
|
||||
@@ -24,7 +24,7 @@ if(is_readable(PAGE_DIR.$page.PAGE_EXT)) {
|
||||
include(PAGE_DIR.$page.PAGE_EXT);
|
||||
include(PAGE_DIR.'footer'.PAGE_EXT);
|
||||
} else {
|
||||
header("HTTP/1.0 404 Not Found");
|
||||
header("Status: 404 Not Found");
|
||||
include(PAGE_DIR.'header'.PAGE_EXT);
|
||||
print "<h1>Error: Page \"$page\" not found</h1>";
|
||||
include(PAGE_DIR.'footer'.PAGE_EXT);
|
||||
|
Reference in New Issue
Block a user