Our web design team has an affinity for PHP. This means I am often provided with HTML pages containing PHP. I am then tasked with using these pages in my CGI scripts. The below code is a vain and doomed attempt to do so.
print "Content-type: text/html\n\n";
<?php include('header.php'); ?>
<!--rest of doc-->
But when I print PHP code it does not get executed and gets printed literaly. This is because the CGI is bypassing the Apache PHP processor when printing to STDOUT.
So I currently have to recode all the PHP into Perl, This is a great hassle when they start getting more fancy than a file include
How can I get the PHP executed before printing it to STDOUT?