jowd
03-08-2005, 10:11 AM
OK, I must simply be missing something because it's 6am and I've been sitting in front of the computer for 14 hours...
Here's the error I'm getting:Fatal error: Cannot instantiate non-existent class: page in /home/jopie916/public_html/xzamnet2/index.php on line 10
Contents of index.php:require_once('settings.php');
$contentSrc = $_REQUEST["p"];
if (empty($contentSrc)) {
$contentSrc = ENV_CONTENT_DEFAULT;
}
$oPage = new Page($contentSrc); // <-- line 10
$oPage->Render();
Contents of settings.php:
define("ENV_SERVER_ADDRESS", "http://www.jopie916.com/xzamnet2");
define("ENV_SITE_PATH", "/");
define("ENV_SITE_ROOT", ENV_SERVER_ADDRESS.ENV_SITE_PATH);
define("ENV_CONTENT_DEFAULT", "/");
define("ENV_TEMPLATE_PATH", ENV_SITE_ROOT."Templates/");
define("ENV_TEMPLATE_FILE", ENV_TEMPLATE_PATH."standard_index.php");
define("ENV_CLASSES_PATH", ENV_SITE_ROOT."Classes/");
require_once(ENV_CLASSES_PATH."PageClass.php");Contents of PageClass.php:class Page {
var $deleteme;
function Page($path = "") {
if (empty($path)) {
$path = $_SERVER["PHP_SELF"];
}
$this->pPath = $path;
// $this->ParsePath($this->pPath);
}
function Render() {
// include template page
include(ENV_TEMPLATE_FILE);
}
}Contents of standard_index.php:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
</head>
<body>
Hi.
</body>
</html>here's the address where it's hosted: http://www.jopie916.com/xzamnet2/
I have verified that all of the files are in the correct directories and that the filenames are correct, and in correct case.
Ideas anyone?
Here's the error I'm getting:Fatal error: Cannot instantiate non-existent class: page in /home/jopie916/public_html/xzamnet2/index.php on line 10
Contents of index.php:require_once('settings.php');
$contentSrc = $_REQUEST["p"];
if (empty($contentSrc)) {
$contentSrc = ENV_CONTENT_DEFAULT;
}
$oPage = new Page($contentSrc); // <-- line 10
$oPage->Render();
Contents of settings.php:
define("ENV_SERVER_ADDRESS", "http://www.jopie916.com/xzamnet2");
define("ENV_SITE_PATH", "/");
define("ENV_SITE_ROOT", ENV_SERVER_ADDRESS.ENV_SITE_PATH);
define("ENV_CONTENT_DEFAULT", "/");
define("ENV_TEMPLATE_PATH", ENV_SITE_ROOT."Templates/");
define("ENV_TEMPLATE_FILE", ENV_TEMPLATE_PATH."standard_index.php");
define("ENV_CLASSES_PATH", ENV_SITE_ROOT."Classes/");
require_once(ENV_CLASSES_PATH."PageClass.php");Contents of PageClass.php:class Page {
var $deleteme;
function Page($path = "") {
if (empty($path)) {
$path = $_SERVER["PHP_SELF"];
}
$this->pPath = $path;
// $this->ParsePath($this->pPath);
}
function Render() {
// include template page
include(ENV_TEMPLATE_FILE);
}
}Contents of standard_index.php:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
</head>
<body>
Hi.
</body>
</html>here's the address where it's hosted: http://www.jopie916.com/xzamnet2/
I have verified that all of the files are in the correct directories and that the filenames are correct, and in correct case.
Ideas anyone?
