Hello.
I wanted to add a login box to my forum on my website, but when I put the following code, my includes doesn't work anymore.
<?php
define("IN_MYBB", 1);
require "../forum/global.php";
?>
The page index.php includes the page global.php which includes the pages header_en.php (which contains the code), menu_en.php and footer_en.php. The two last pages are not displayed anymore with the code.
Can someone help me? Thanks.
<base href="{$mybb->settings['bburl']}/" /> ??
Fixed my problem when i tried to do stuff from another directory...
Although i fear it's only related to linking.
( Perhaps if you change it using another function instead of href it might help :/ )
Do you think that replacing
require "../forum/global.php";
with
require "{$mybb->settings['bburl']}/global.php";
will fix the problem?
Or using
$mybbdir = "{$mybb->settings['bburl']}";
then
require $mybbdir . "/global.php";
?
But how can PHP know the content of {$mybb->settings['bburl']} as I'm in the website, and not in MyBB ?
It doesn't work : as I thought : {$mybb->settings['bburl']} = no such file or directory.
Another idea? It's pretty urgent...
In fact, it doesn't try to include the files, it's as if the includes were "deleted" by the code.
But the files I want to include ARE in
http://www.mysite.com/, not in /forum/ ...
Ohh sorry, than i mistook the situation.
I'm no php expert, but someone else must be able to help you by a quick function.
Up : the following line :
require "../forum/global.php";
breaks my includes : the files called by the include functions
after this line are not displayed.
Someone has an idea ?
Is global.php in
www.mysite.com/forum/ and is the file your trying to include it from in mysite.com?
If so, change:
require "../forum/global.php";
To:
require "./forum/global.php";
Try to link the file by using the full path, eg. /home/www/mysite.com/htdocs/forum/global.php but obviously using your hosts full path.