Fervolador
|
| Posted: 03/23/2005, 7:17 AM |
|
Hi !!! I've a problem. I want include a page into a variable
as like this
$variable=include("menu.php");
cause I will use this variable to assign as part of a tamplate.
$tpl->set_var("menu",$variable)
I know that's imposible but, maybe are any other solution.
I hope somebody HELP ME!!! 
Bye
|
|
|
 |
Nicole
Posts: 586
|
| Posted: 03/24/2005, 2:25 AM |
|
Hello,
If "menu" is a CCS page I recommend that you just make it Includable and handle with it like with includable page.
If menu.php is just an external script which output you want to include into CCS page you can use PHP output control functions to obtain menu output. E.g.
ob_start();
include("menu.php");
$contents = ob_get_contents();
ob_end_clean();
global $Tpl;
$Tpl->set_var("menu",$contents)
Refer to PHP docs for more information about used functions http://www.php.net/manual/en/ref.outcontrol.php
_________________
Regards,
Nicole |
 |
 |
Damian Hupfeld
|
| Posted: 03/24/2005, 4:08 AM |
|
or use the implode function.
"Nicole" <Nicole@forum.codecharge> wrote in message
news:5424295a259aff@news.codecharge.com...
> Hello,
> If "menu" is a CCS page I recommend that you just make it Includable and
> handle
> with it like with includable page.
>
> If menu.php is just an external script which output you want to include
> into
> CCS page you can use PHP output control functions to obtain menu output.
> E.g.
>
> ob_start();
> include("menu.php");
> $contents = ob_get_contents();
> ob_end_clean();
>
> global $Tpl;
> $Tpl->set_var("menu",$contents)
>
> Refer to PHP docs for more information about used functions
> http://www.php.net/manual/en/ref.outcontrol.php
>
> _________________
> Regards,
> Nicole
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>
|
|
|
 |
|