![]() |
PHP Question
I changed a .shtml page into a .php page so I could include some PHP files, etc.
On the .shtml page I was calling out a cgi script to be run like this: <!--#exec cgi="../cgi-bin/script.cgi" --> But now that the page is a .php it's not running. How to I call this out with php? I tried: <?php include("../cgi-bin/script.cgi"); ?> But that didn't work... Thanks! :helpme |
exec( "/path/to/cgi/script/script.cgi" );
|
include "file.php";
|
Quote:
have you even bothered to read the thread ? |
try
virtual("../cgi-bin/script.cgi"); it work for me |
<?virtual("../cgi-bin/script.cgi");?>
that should work for you ... |
you can use the SetHandler directive in htaccess to process the .php file as a .shtml file if you need to
|
ask jimthefiend, he knows everything!
|
Yeah, virtual might work, havent messed with it in a while. You could also try to fopen("http://www.your.com/cgi-bin/file.cgi"), slower but maybe better.
The problem is that PHP has no idea how to parse your CGI code, so you will have to read in the OUTPUT of the script. -G |
virtual() is your best solution here as long as it is apache.
You can also use passthru() to execute the script, this would not case an apache subrequest to launch, and might be better in some cases. |
Quote:
|
Hey, thanks for all the replies. I just made a seperate .shtml page and put it in an iframe, that worked the best.
Thanks! |
| All times are GMT -7. The time now is 10:33 AM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2026, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123