Page 1 of 1

printing PHP code

Posted: Mon Dec 09, 2002 9:29 am
by mzfp2
Hi

I have a few functions which reads a template html file and fills in template variables with actual values.

However when outputting PHP code to the template file like this:

print "<? print something; ?>";

the code is not excuted in the generated HTML file,

how could i write to a document at execution time, and make the php code itself im writing execute too?

the example above best illustrates what i mean

thanks

M

Posted: Mon Dec 09, 2002 10:22 am
by BDKR
There are security issues with running as PHP any file seen. PHP in that case would be pretty promiscous. And we all know what kinds of things that can lead to. Check out include(), recquire(), and eval().

Cheers,
BDKR