Re: Evaluating code

From: Date: Wed, 06 Mar 2002 21:29:31 +0000
Subject: Re: Evaluating code
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-87534@lists.php.net to get a copy of this message
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 roberts_paul@bigfoot.com ++++++++++++++++++++++++ ----- Original Message ----- From: "Ernesto" <xtango@netcombbs.com.ar> To: <php-general@lists.php.net> 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 > > >

« previous php.general (#87534) next »