on 7.5 (recently upgraded from 6.0) I'm trying to install a static html module, then set it as my home page, and I've seen a couple of different scripts around, but they only give me a completely blank page, or 'unable to access this file'
hopefully its something simple, as I'm a bit of a newbie, and not very versed in php.
here's one that brings up a blank page, afterwards I have another
|
Code:
|
<?php
if (!eregi("modules.php", $PHP_SELF)) {
die ("You can't access this file directly...");
}
$index = 0; // 0 : do not show right blocks - 1:show right blocks
require_once("mainfile.php");
$module_name = basename(dirname(__FILE__));
include("header.php");
$ACCEPT_FILE['thisissue.html'] = 'thisissue.html';
OpenTable();
$php_ver = phpversion();
$php_ver = explode(".", $php_ver);
$phpver = "$php_ver[0]$php_ver[1]";
if ($phpver >= 41) {
$page = $_GET['page'];
} else {
$page = $HTTP_GET_VARS['page'];
}
$pagename = $ACCEPT_FILE[$page];
if (!isSet($pagename)) $pagename = "thisissue.html"; // default file
include("modules/This_Issue/$pagename");
CloseTable();
include("footer.php");
?> |
Here is the one that gives me "you can't access this file directly"
|
Code:
|
if (!eregi("modules.php", $PHP_SELF)) {
die ("You can't access this file directly...");
}
$index = 0; // 0 : do not show right blocks - 1:show right blocks
require_once("mainfile.php");
$module_name = basename(dirname(__FILE__));
include("header.php");
$ACCEPT_FILE['thisissue.html'] = 'thisissue.html';
OpenTable();
$php_ver = phpversion();
$php_ver = explode(".", $php_ver);
$phpver = "$php_ver[0]$php_ver[1]";
if ($phpver >= 41) {
$page = $_GET['page'];
} else {
$page = $HTTP_GET_VARS['page'];
}
$pagename = $ACCEPT_FILE[$page];
if (!isSet($pagename)) $pagename = "modules.php?name=This_Issue&page=thisissue.html"; // default file
include("modules/This_Issue/$pagename");
CloseTable();
include("footer.php");
?> |