in reply to Re: Make PHP, yatta yatta....
in thread Make PHP Execute in CGI output
So I write my HTML to file then pass it to the PHP executable. Not very efficient but it works. Thank you all for putting me onto this method
my $html =<<HTML; Content-type: text/html\n\n <?php include('header.php'); ?> <body> <!-- rest of doc --> </body> </html> HTML open PHP, '>phpinput.php'; print PHP $html; close PHP; #-q option to PHP forces it to leave off http headers my $output =eval {`/usr/local/php/bin/php -q phpinput.php`}; print $output unless $@;
|
|---|