Posted by Colin McKinnon on 09/29/41 11:25
talthen.z-serwera.o2@nospam.pl wrote:
> "Kimmo Laine" <eternal.erectionN0.5P@Mgmail.com>
>
>> ob_start();
>> include('file');
>> $x = ob_get_clean();
>> echo $x;
>
> Well.. it doesn't work. I changed it to:
> <?
> $hej=5;
> ob_start();
> include('file');
> $x = ob_get_clean();
> ob_end_clean();
> echo $x;
> ?>
>
> But still it shows me non parsed "file".
>
If you REALLY can't change the included file to use proper PHP syntax, you
could try using eval() but I suspect you really just need to add <?= ?>
tags around the PHP variable. Make sure you understand the security
implications before using eval() on a production machine, - you're leaving
your system wide open to PHP injection. Even if you just fix the tags, your
going to be vulnerable to XSS attacks.
C.
Navigation:
[Reply to this message]
|