Reputation: 2754
On Apache the code below will run index.cgi and return the content of cgi to php page
<?php
$command= './cgi-bin/index.cgi';
echo system($command);
?>
On IIS this doesn't seem to work that way. How can I have the same behavior on IIS 7 ?
Upvotes: 0
Views: 240
Reputation: 197775
Short answer: You can't.
This is why: The command ./cgi-bin/index.cgi
does either not exists on IIS or is not executable on the IIS platform. This is a command that is dependent to the computer system the PHP script is installed on.
On IIS you need to create code that is cross-platform compatible. It needs to choose another command that does the same like ./cgi-bin/index.cgi
but actually works on the IIS platform.
Probably not the answer you would like to hear. Probably you can say what that CGI script does and we can find a solution. Alternatively you can add the code from that file to your question.
Upvotes: 1