You can do
eval("?>$fp");
this will echo the evaluated $fp data. as you exit php mode before the eval,
so any php in the file needs to be in <? ?> tags
you can also catch it with output buffering if you need to.
Paul Roberts
[EMAIL PROTECTED]
++++++++++++++++++++++++
----- Original Message -----
From: "Ernesto" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, March 06, 2002 8:55 PM
Subject: [PHP] Evaluating code
>
> Hi,
>
> I have code stored on a server which I retrieve via fsockopen() and put it
> into a variable (It's like if it were on a database).
> Now, I want to eval that code, but eval() won't work because it has HTML
> and PHP mixed, with <?php ?> and everything.
>
> I know I can eval this code saving it to a file and then including it, but
> I want to know if there's a better way.
> As I'm going to do this all the time, I prefer not to create temporary
> files (so I don't slow down everything).
>
> Any ideas?
>
> Thanks in advance,
> Ernesto
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php