Is there a way to control/execute PHP commands from CGI script written in Perl?
Suppose i have three files:
- /cgi-bin/script.cgi
- /template.php
- /includes.php
where the file template.php have these lines:
...some html goes here...
<?php
include ("includes.php");
?>
...some more html goes here...
what i want to accomplish is:
When i connect to http://www.blahblahblah.com/cgi-bin/script.cgi, i want the cgi-script to read and print the contents of template.php to the browser, while still be able to process the PHP command (include ("includes.php"))
So in the end, i want script.cgi to output:
... some html from template.php ...
... some result from includes.php ...
... some more html from template.php ...
instead of:
...some html from template.php...
<?php
include ("includes.php");
?>
... some more html from template.php...
How can i accomplish this? What command(s) do i need to use in Perl so the cgi script can parse and execute the PHP file?
Thanks.
Suppose i have three files:
- /cgi-bin/script.cgi
- /template.php
- /includes.php
where the file template.php have these lines:
...some html goes here...
<?php
include ("includes.php");
?>
...some more html goes here...
what i want to accomplish is:
When i connect to http://www.blahblahblah.com/cgi-bin/script.cgi, i want the cgi-script to read and print the contents of template.php to the browser, while still be able to process the PHP command (include ("includes.php"))
So in the end, i want script.cgi to output:
... some html from template.php ...
... some result from includes.php ...
... some more html from template.php ...
instead of:
...some html from template.php...
<?php
include ("includes.php");
?>
... some more html from template.php...
How can i accomplish this? What command(s) do i need to use in Perl so the cgi script can parse and execute the PHP file?
Thanks.