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.



PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to