Alright, I've run into a little problem. I have an html file with some
<?php ?> tags and such that need to be evaluated. Some of you probably
already know what I'm getting at.
I need to be able to open the file, make some changes, then execute the
code. I need it to behave like include() or require(). eval() was a
decent solution, but it only supports raw php code.
So what I'm doing is saving the modified code back out to a temp file,
calling include() on the temp file, and then deleting it. Seems like an
awful lot of work.
Is there a way to do this better? Basically an include() that I pass
code to rather than a file pointer?
--
- Thom McGrath
Head of the ZeeTox Project and lead programmer for The ZAZ
Contact me with iChat or AOL Instant Messenger: zazTekcor
<?php ?> tags and such that need to be evaluated. Some of you probably
already know what I'm getting at.
I need to be able to open the file, make some changes, then execute the
code. I need it to behave like include() or require(). eval() was a
decent solution, but it only supports raw php code.
So what I'm doing is saving the modified code back out to a temp file,
calling include() on the temp file, and then deleting it. Seems like an
awful lot of work.
Is there a way to do this better? Basically an include() that I pass
code to rather than a file pointer?
--
- Thom McGrath
Head of the ZeeTox Project and lead programmer for The ZAZ
Contact me with iChat or AOL Instant Messenger: zazTekcor
Comment