PDA

View Full Version : Customized page, root dir.


Sergio68
25 Oct 2006, 17:05
I made this page and it's working at this address http://www.vbulletin.it/forums/prova.php

<?php

error_reporting(E_ALL & ~E_NOTICE);
define('NO_REGISTER_GLOBALS', 1);
define('GET_EDIT_TEMPLATES', true);
define('THIS_SCRIPT', 'releases');
$phrasegroups = array();
$specialtemplates = array();
$globaltemplates = array();
$actiontemplates = array();
require_once('./global.php');

$navbits = array();
$navbits[''] = 'Home Page';
$navbits = construct_navbits($navbits);
eval('$navbar = "' . fetch_template('navbar') . '";');
eval('print_output("' . fetch_template('homenew') . '");');

?>

If I try to do the same on the root dir http://www.vbulletin.it/prova.php it's not working, can you tell me why ?

error_22
25 Oct 2006, 18:36
prova.php is trying to call global.php in the same directory (root)


require_once('./global.php');


Try to do this instead:


require_once('./forums/global.php');

Sergio68
25 Oct 2006, 22:13
Thx error22, I did try that to but no results :(
You can try to check : http://www.vbulletin.it/prova.php

White page and no errors. I even try with absolute addressing.







Done, that's the way :D :

chdir('/srv/www/www.vbulletin.it/forums/');
require_once('./global.php');