To include local php file you can use usual include() functoin.
Path to file is relative to forum root directory. Use variable $phpbb_root_path to make sure that path is always relative to phpbb root path.
If your forum is in directory /phpBB2/ and you want to include file /my_website/header.php you should use this code:
- Code: Select all
<?php include($phpbb_root_path . '../my_website/header.php'); ?>
If you want to include remote file via http you should use function readfile():
- Code: Select all
<?php @readfile('http://somewhere/somefile.php'); ?>
Remote files are treated as html files, not as php files. And you'd better add @ before function to suppress warning in case if remote file is temporary unavailable.


