ptmuldoon
11-27-2007, 01:10 AM
I'm working with a set of php5 scripts, trying to modify it to work with a separate chat script. But for some strange (or not strange) reason, the code for the chat is always loaded first when viewing the page. It even loads before any of the header information.
Would this be something related to php5 in general or something else?
The below function is part of a larger php class
public function show($info = "")
{
if(!isset($_GET['do']))
$do = "show_games";
else
$do = "show_".$_GET['do'];
if($_GET['do'] == "search")
$do = "show_games";
$this->output.="
<TABLE WIDTH=\"100%\">
<TR>
<TD text-align\"left\">
<TABLE>
<TR>
<TD valign=\"top\">Put something Here</TD>
</TR>
<TR>
<TD>".chat_shoutbox()."</TD>
</TR>
</TABLE>
</TD>
<TD valign=\"top\" text-align\"right\">This will be the Right Side blocks</TD>
</TR>
</TABLE>
";
$this->show_output();
}
In the above, I've modified it to include the chat_shoutbox() function. The chat/shoutbox is loaded, but is always the first thing at the top of the page. I've gone as far as making the shoutbox function a simple echo statement, and it still loads first before anything else.
Would this be something related to php5 in general or something else?
The below function is part of a larger php class
public function show($info = "")
{
if(!isset($_GET['do']))
$do = "show_games";
else
$do = "show_".$_GET['do'];
if($_GET['do'] == "search")
$do = "show_games";
$this->output.="
<TABLE WIDTH=\"100%\">
<TR>
<TD text-align\"left\">
<TABLE>
<TR>
<TD valign=\"top\">Put something Here</TD>
</TR>
<TR>
<TD>".chat_shoutbox()."</TD>
</TR>
</TABLE>
</TD>
<TD valign=\"top\" text-align\"right\">This will be the Right Side blocks</TD>
</TR>
</TABLE>
";
$this->show_output();
}
In the above, I've modified it to include the chat_shoutbox() function. The chat/shoutbox is loaded, but is always the first thing at the top of the page. I've gone as far as making the shoutbox function a simple echo statement, and it still loads first before anything else.