I have enabled cgi on IIS
PB App
Code: Select all
If Not InitCGI() Or Not ReadCGI()
End
EndIf
name$=CGIParameterValue("name")
WriteCGIHeader(#PB_CGI_HeaderContentType,"text/html",#PB_CGI_LastHeader)
WriteCGIString("Hello "+name$)
Code: Select all
;/ Created with PureVision v5.40
;/ Mon, 09 Nov 2015 11:45:45
;/ by Paul Leischow
Define EventID,MenuID,GadgetID,WindowID
;- Window Constants
Enumeration 1
#Window_Main
EndEnumeration
;- Gadget Constants
Enumeration 1
;Window_Main
#Gadget_Main_Text2
#Gadget_Main_Name
#Gadget_Main_OK
EndEnumeration
Procedure.i Window_Main()
If OpenWindow(#Window_Main,158,117,335,84,"CGI Test",#PB_Window_SystemMenu|#PB_Window_ScreenCentered|#PB_Window_Invisible)
TextGadget(#Gadget_Main_Text2,15,15,60,15,"Name:")
StringGadget(#Gadget_Main_Name,15,30,230,20,"")
ButtonGadget(#Gadget_Main_OK,255,30,60,20,"OK")
HideWindow(#Window_Main,0)
ProcedureReturn WindowID(#Window_Main)
EndIf
EndProcedure
Procedure HttpGetEvent(Success, Result$, UserData)
If Success
debug "======================================="
Debug Result$
debug "======================================="
debug UserData
Else
Debug "HTTPRequest(): Error"
EndIf
EndProcedure
Procedure CloseWindowEvent()
WindowID=EventWindow()
If WindowID=#Window_Main
CloseWindow(#Window_Main)
EndIf
EndProcedure
;- GadgetEvent Loop
Procedure GadgetEvent()
GadgetID=EventGadget()
Select GadgetID
Case #Gadget_Main_OK
HTTPRequest(#PB_HTTP_Get, "http://localhost/test/cgi-bin/cgitest.exe?name="+GetGadgetText(#Gadget_Main_Name), "", @HttpGetEvent())
EndSelect
EndProcedure
;- Main Loop
If Window_Main()
BindEvent(#PB_Event_Gadget,@GadgetEvent())
EndIf
the output
https://gyazo.com/397bf71f4b30a28dcff2abfde32134f4
Is this a bug?





