2010-06-22, 08:58 PM
Hi.
I am working on an integration job for a client.
I have a file (http://example.com/forums/wb.php) which has the logic to show the welcome block. If you go to that page in your browser, it shows the memeber block if you are logged in, and the anonymous block when you are not.
If I try to integrate that page into anything in the forums directory, it shows the proper block. If I try to integrate it into anything outside of the forums directory, it does not.
The cookie settings are fine (all blank).
example.com\forums\wb.php code:
include code:
I've used this code many times in this site, it works fine, so it's not the include code's fault.
Why is it doing this?
I am working on an integration job for a client.
I have a file (http://example.com/forums/wb.php) which has the logic to show the welcome block. If you go to that page in your browser, it shows the memeber block if you are logged in, and the anonymous block when you are not.
If I try to integrate that page into anything in the forums directory, it shows the proper block. If I try to integrate it into anything outside of the forums directory, it does not.
The cookie settings are fine (all blank).
example.com\forums\wb.php code:
<?php
define('IN_MYBB', 1); // (1a)
require "./global.php"; // (1b)
eval("\$wb = \"".$templates->get("wb")."\";"); // (3)
output_page($wb); // (4)
?>
include code:
<?php
$url = "http://example.com/forums/wb.php";
$handle = file_get_contents($url);
echo $handle;
?>
I've used this code many times in this site, it works fine, so it's not the include code's fault.
Why is it doing this?