Re: resolving php tags in a string

From: Date: Fri, 22 Feb 2002 17:19:10 +0000
Subject: Re: resolving php tags in a string
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-85870@lists.php.net to get a copy of this message
get all from the string which is between the tags and use the substring with eval(); Best regards, Andrey Hristov ----- Original Message ----- From: "neko" <neko@swirve.com> To: <php-general@lists.php.net> Sent: Friday, February 22, 2002 5:42 AM Subject: [PHP] resolving php tags in a string > I have a question: I normally use include to include a file, which often has > php tags that are then interpreted and resolved. > > However, in one case I am reading a text file into a string (fread), then > running nl2br() on it to present it (with an echo command). > > However, I wish to also resolve any php tags, which obviously aren't in this > case and are just presented in the browser as plain text. > > What's the best way to solve this one? First thought was to write it to a > temporary file and then call an include on that, but that sounds plain bad. > > neko > > -- > "The secret of genius is to carry the spirit of the child into old age, > which means never losing your enthusiasm." > -- Aldous Leonard Huxley > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

« previous php.general (#85870) next »