이전 실행 가능 프로그램을 Apache의 cgi-bin
디렉토리에두고 CGI 스크립트로 사용할 수 있다는 인상하에있었습니다. 내가Windows에서 Apache의 실행 파일에 CGI 인수 전달
static class TestProg
{
static void Main(string[] args)
{
Console.Write("Content-type: text/plain\r\n\r\n");
Console.WriteLine("Arguments:");
foreach (string arg in args)
Console.WriteLine(arg);
}
}
를 C# 프로그램이 다음 다음 쿼리 문자열 hello=kitty&goodbye=world
메인에 첫 번째 매개 변수로 전달 될 것이다 http://example.com/cgi-bin/TestProg?hello=kitty&goodbye=world
로 이동하는 경우 특히, 나의 페이지
Arguments:
hello=kitty&goodbye=world
불행하게도과 같아야합니다, 내 쿼리 매개 변수가 전달되지 않습니다. 페이지가로드되고 그 다음에 아무것도 표시되지 않고 Arguments:
만 인쇄됩니다.
그래서이 프로그램에 전달 된 쿼리 매개 변수를 어떻게 얻습니까?