Code: Selecteer alles
<?php
define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'site_extension.inc');
include($phpbb_root_path . 'site_common.'.$phpEx);
//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_PROFILE);
init_userprefs($userdata);
//
// End session management
//
$template->set_filenames(array(
'body' => 'site_index.tpl')
);
$page_title = $lang['My_title']; // You'll have to set this in a $lang file somewhere
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
$template->pparse('body');
$template->assign_vars(array( 'VARNAME1' => 'tekst1',
'VARNAMEn' => 'tekst2')
);
//Switches are like "optional" parts of the template. They only appear if the switch is set.
//If the switch is not set, it's simply not shown.
if ( $userdata['session_logged_in'] )
{
$template->assign_block_vars('switch_user_logged_in',array() );
}
if ( $userdata['session_logged_in'] )
{
$template->assign_block_vars('switch_user_logged_in',array() );
}
else
{
$template->assign_block_vars('switch_user_logged_out',array() );
}
?>
/templates
site_overall_header.tpl
site_index.tpl
site_overall_footer.tpl
en /includes
site_common.php
site_extension.inc
site_page_header.php
site_page_tail.php
Waarom werkt dit niet en wat moet ik doen om het te fixen? Ik krijg deze error:
Code: Selecteer alles
Warning: main(./site_extension.inc): failed to open stream: No such file or directory in /var/www/html/index2.php on line 4
Warning: main(): Failed opening './site_extension.inc' for inclusion (include_path='.:/php/includes:/usr/share/php') in /var/www/html/index2.php on line 4
Warning: main(./site_common.): failed to open stream: No such file or directory in /var/www/html/index2.php on line 5
Warning: main(): Failed opening './site_common.' for inclusion (include_path='.:/php/includes:/usr/share/php') in /var/www/html/index2.php on line 5
Fatal error: Call to undefined function: session_pagestart() in /var/www/html/index2.php on line 10