我的PHPBB版本已安装在我网站的/board
我正在尝试在名为store
的新目录中创建一个自定义页面,该文件名为decals.php
decals.php
<?php
define('IN_PHPBB', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);
// Start session management
$user->session_begin();
$auth->acl($user->data);
$user->setup();
page_header('Store - Decals');
$template->set_filenames(array(
'body' => 'store_decals_body.html',
));
make_jumpbox(append_sid("{$phpbb_root_path}viewforum.$phpEx"));
page_footer();
?>
store_decals_body.html
已上传到我的styles
目录,似乎无法使mysite.com/board/store/decals.php
正常工作。它总是把我带到mysite.com/board
我在这里忽略了什么吗?
答案 0 :(得分:1)
如果您在子目录中有PHP文件,请相应地更改根路径:
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : '../';