hi i wrote the following and it works fine in an iframe or whatever but if i try to use include i get the following errors.
include '/home/***/public_html/community/cforumstats.php';
PHP Code:
[26-Feb-2009 08:33:54] PHP Parse error: syntax error, unexpected T_STRING in /home/***/public_html/community/cforumstats.php(43) : eval()'d code on line 1
[26-Feb-2009 08:34:00] PHP Parse error: syntax error, unexpected T_STRING in /home/***/public_html/community/cforumstats.php(43) : eval()'d code on line 1
[01-Mar-2009 09:58:53] PHP Fatal error: Call to a member function query_first_slave() on a non-object in /home/***/public_html/community/includes/functions.php on line 1368
[01-Mar-2009 09:59:27] PHP Fatal error: Call to a member function query_first_slave() on a non-object in /home/***/public_html/community/includes/functions.php on line 1368
[01-Mar-2009 10:02:17] PHP Fatal error: Call to a member function query_first_slave() on a non-object in /home/***//public_html/community/includes/functions.php on line 1368
here's the code:
PHP Code:
<?php
// ####################### SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);
// #################### DEFINE IMPORTANT CONSTANTS #######################
define('NO_REGISTER_GLOBALS', 1);
define('THIS_SCRIPT', 'cforumstats'); // change this depending on your filename
// ################### PRE-CACHE TEMPLATES AND DATA ######################
// get special phrase groups
$phrasegroups = array(
);
// get special data templates from the datastore
$specialtemplates = array(
);
// pre-cache templates used by all actions
$globaltemplates = array(
'cforumstats',
);
// pre-cache templates used by specific actions
$actiontemplates = array(
);
// ######################### REQUIRE BACK-END ############################
chdir('/home/***/public_html/community');
require_once('./global.php');
// #######################################################################
// ######################## START MAIN SCRIPT ############################
// #######################################################################
$navbits = array();
//$navbits[$parent] = 'cforumstats';
//$navbits = construct_navbits($navbits);
//eval('$navbar = "' . fetch_template('navbar') . '";');
eval('print_output("' . fetch_template('cforumstats') . '");');
?>
ANY HELP WOULD BE FANTASTIC!!
--------------- Added [DATE]1235927532[/DATE] at [TIME]1235927532[/TIME] ---------------
darn it! why would this work when i load the page in the browser but not using include? :x
works:
www.example.com/cforumstats.php
does not work: include '/path/to/cforumstats.php';