You are not logged in.
- Topics: Active | Unanswered
Pages: 1
#1 2009-01-22 16:22:11
- raindeer
- Member
- Registered: 2009-01-22
- Posts: 5
multiple includes
Hi,
i have one .php file in which I include index.php from FluxBB. The problem is, it doesn't load. I have to change all the PUN_ROOT files probably (isn't there any global variable that does the job)? When I access FluxBB directly, it works perfectly. But includes make trouble.
Thanx.
Offline
#2 2009-01-22 16:30:24
- MattF
- Member

- From: South Yorkshire, England
- Registered: 2008-05-06
- Posts: 1,230
- Website
Re: multiple includes
With such a vague question, it is nigh on impossible to give you any relevant advice. Explain what you mean fully.
Screw the chavs and God save the Queen!
Offline
#3 2009-01-22 16:32:05
- Connor
- Former Developer
- Registered: 2008-04-27
- Posts: 1,127
Re: multiple includes
Basically, you shouldn't be including index.php, it outputs full pages. What are you actually trying to do?
Offline
#4 2009-01-22 16:37:42
- raindeer
- Member
- Registered: 2009-01-22
- Posts: 5
Re: multiple includes
Well, let's consider this situation on localhost:
// file called loadFluxBB.php, located outside FluxBB folder
<?php
include('./fluxbb/upload/index.php');
?>
the problem is, when the variable PUN_ROOT is set to './' (echo define('PUN_ROOT', './')), I receive this trouble:
Warning: require(./include/common.php) [function.require]: failed to open stream: No such file or directory in C:\xampp\htdocs\fluxbb\upload\index.php on line 28
Fatal error: require() [function.require]: Failed opening required './include/common.php' (include_path='.;C:\xampp\php\pear\') in C:\xampp\htdocs\fluxbb\upload\index.php on line 28
When I change to this in index.php: echo define('PUN_ROOT', './fluxbb/upload/')), it partially works(without styles, only some functionality and so on). How does the FORUM_ROOT works?
Offline
#5 2009-01-22 16:46:35
- Smartys
- Former Developer
- Registered: 2008-04-27
- Posts: 3,117
- Website
Re: multiple includes
1.2 doesn't work well when it's used like that. It wasn't meant to be run from outside of its folder.
Offline
#6 2009-01-22 16:47:48
- raindeer
- Member
- Registered: 2009-01-22
- Posts: 5
Re: multiple includes
Does 1.3 work fine?
Offline
#7 2009-01-22 16:50:23
- Smartys
- Former Developer
- Registered: 2008-04-27
- Posts: 3,117
- Website
Re: multiple includes
It should, but 1.3 is not going to be supported in the future and it isn't meant to be used in production.
Offline
#8 2009-01-22 16:56:28
- raindeer
- Member
- Registered: 2009-01-22
- Posts: 5
Re: multiple includes
ok, thank you.
Offline
Pages: 1
