Re: Looking for a combo of include() and eval() ????

From: Date: Thu, 07 Mar 2002 00:57:57 +0000
Subject: Re: Looking for a combo of include() and eval() ????
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-87553@lists.php.net to get a copy of this message
Looking around, I see someone else has submitted a feature request for this exact thing... http://bugs.php.net/bug.php?id=5435 Not that this helps *me*, but there's more than one of us :) On Wed, 6 Mar 2002, Philip Hallstrom wrote: > Hi - > Here's my dilema. > > include() will include a *file* and if there are PHP tags in it will run > that PHP code, otherwise pass it along as is. > > eval() will parse a *string* of PHP code, but assumes it's valid PHP code. > > I want to something like this: > > - read a file that contains a mixture of text and PHP code into $string. > - evaluate $string in the same way include() does it. > > > The reasoning for this is that include() works great if what you're > including is in the filesystem, but what if it's in the database? There > doesn't seem to be a way to do it then. > > What I really want is a include_string() function. > > Anyone know if something like this exists? I looked, but couldn't find > it. I also looked through the source code and while I found the parts > that deal with includes/evals I don't know enough to know how to add it. > > > Any and all help appreciated. > > thanks! > > -philip > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

« previous php.general (#87553) next »