kmiles has asked for the wisdom of the Perl Monks concerning the following question:
Hi Monks,
I have several new web sites that use PHP heavily (all of our existing sites use Perl). All I want to be able to do is create a PHP template for output from a Perl program. Template is created, slurp the template into $var, replace with content using regexp, then print STDOUT "Content-type: text/html\n\n$var\n";
Problem is that <?php commands ?> are ignored when dumped this way. I've written the contents to a temp file and then output a html redirect, which works but is very messy and slow.
Is there a way to output to STDOUT but have the PHP processed?
Thanks for any help!
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Output PHP
by rafl (Friar) on Jan 09, 2008 at 03:53 UTC | |
by olus (Curate) on Jan 09, 2008 at 11:35 UTC | |
by kmiles (Initiate) on Jan 09, 2008 at 17:53 UTC | |
Re: Output PHP
by Cody Pendant (Prior) on Jan 09, 2008 at 06:06 UTC | |
Use Perl to output PHP template
by kmiles (Initiate) on Jan 10, 2008 at 16:21 UTC |
Back to
Seekers of Perl Wisdom