
hey people iam currently designing v2 of my site and am using PHP technology. anyways, i am using the <? include ($) ?> code that lets u embedd html and other pages within that tag and that works great for my main page for the content.
so anyway here is where the problem comes in, i have a shoutbox to the left of the main content and i don't want to include it in its slice with an iframe so what I am asking is that is there a way that i can include the shoutbox file without it being in an iframe.
i tried to use the <? include (' ') ?> which is an unchangable code that embeds a specified html page but it didnt work because the shoutbox is a php file.
any ideas anyone?
Something like this?
<?php
$filename = '/dir/file.php'; //change this!
$use_include_path = 0;
$file = @fopen($filename, 'rb', $use_include_path);
if ($file)
{
if ($fsize = @filesize($filename))
{
$data = fread($file, $fsize);
}
else
{
while (!feof($file))
{
$data .= fread($file, 1024);
}
}
fclose($file);
}
print $data;
?>
would that work? wat part of the code do i exactly edit?
only the line where '//change this!' is located
ok look i implented the code and it doesnt give me any sort of error but it also doesnt display the shoutbox itself so wat do i do now?
try adding
<?php
ini_set ('error_reporting', 'E_ALL');
?>
in your header
this will force PHP to give warnings.
Could you give me a link, so i can see the problem?
i didnt yet launch the most i can do is provide u with a screenshot
ok thomas, i added the code to the header and changed everything and it displays the shoutbox but it gives a little error on one line of coding. when i try to shout in it it gives me an internal service error and i thought it was the fie that allows u to shout so i changed its ch/mod to 777 and it still didnt work. so far it displays it and thats about it. one more thing, the code made it disreguard the stylesheet applied to it as if i put it in an iframe; everything would work fine.
LimitLess could you please paste the error/warning/notice that you get... cause that would be very usefull :)