Including a CGI file with a PHP include
Posted by: cliffster
Posted on: 2005-12-21 16:04:00
Hey all,
Just trying to include a call to a CGI script with a PHP include on a static PHP page. Here is what I'm trying:
<?php
$path = $_SERVER['DOCUMENT_ROOT'];
include("$path/to/script/hello.cgi");
?>
I can hit that script, but the results are the content of the script that I'm trying to include:
#!/usr/bin/perl # hello.cgi - simple script to test if perl is working print "Content-type: text/htmlnn"; print "Hello World from hello.cgi"; exit;
Anyone know if there is something that I should adjust to get this to work?
cliffster