GET-|POSTRequest an PHP Senden?
Verfasst: 27.08.2005 18:09
Hi iwe kann ich einen GET- oder einen POSTRequest an PHP Senden? weil der bringt mir immer: "Could not open input file: www\index.php?pb=get. "
um php aufzurufen nutze ich folgende funktion:
aufruffen tue ich das ganze dann mit:
string$ = RunGetOutput(BaseDirectory$+RequestedFile$)
Den Post verarbeitet er nicht und beim GET bekomme ich diese Fehlermeldung.... was kann ich da noch machen hat da jmd. erfahrung darin oder so?
Thx4Help
MFG
Blackskyliner
um php aufzurufen nutze ich folgende funktion:
Code: Alles auswählen
Structure MySTARTUPINFO
cb.l
lpReserved.l
lpDesktop.l
lpTitle.l
dwX.l
dwY.l
dwXSize.l
dwYSize.l
dwXCountChars.l
dwYCountChars.l
dwFillAttribute.l
dwFlags.l
wShowWindow.w
cbReserved2.w
lpReserved2.l
hStdInput.l
hStdOutput.l
hStdError.l
EndStructure
Procedure.s RunGetOutput(Datei.s)
Protected ret.l, hReadPipe.l, hWritePipe.l, lngBytesread.l
Protected proc.PROCESS_INFORMATION, start.MySTARTUPINFO, sa.SECURITY_ATTRIBUTES
Protected strBuff.s
Protected mOutputs.s
strBuff.s=Space(256)
#NORMAL_PRIORITY_CLASS = $20
#STARTF_USESTDHANDLES = $100
#STARTF_USESHOWWINDOW = $1
;Create the Pipe
sa\nLength = SizeOf(SECURITY_ATTRIBUTES)
sa\bInheritHandle = 1
sa\lpSecurityDescriptor = 0
ret = CreatePipe_(@hReadPipe, @hWritePipe, @sa, 0)
If ret = 0
mOutputs = "500 Interner Server Error";
EndIf
start\cb = SizeOf(MySTARTUPINFO)
start\dwFlags = #STARTF_USESHOWWINDOW | #STARTF_USESTDHANDLES
; set the StdOutput And the StdError output To the same Write Pipe handle
start\hStdOutput = hWritePipe
start\hStdError = hWritePipe
; Execute the command
ret = CreateProcess_(0, "php/php.exe "+Chr(34)+Datei+Chr(34), sa, sa, 1, #NORMAL_PRIORITY_CLASS, 0, 0, @start, @proc)
If ret <> 1
mOutputs = "404 File Not Found("+Datei+")";
Else
WaitForSingleObject_(ret, #INFINITE)
EndIf
ret = CloseHandle_(hWritePipe)
;Read the ReadPipe handle
While ret<>0
ret = ReadFile_(hReadPipe, strBuff, 255, @lngBytesread, 0)
If lngBytesread>0
mOutputs = mOutputs + Left(strBuff, lngBytesread)
EndIf
Wend
;Close the opened handles
ret = CloseHandle_(proc\hProcess)
ret = CloseHandle_(proc\hThread)
ret = CloseHandle_(hReadPipe)
ProcedureReturn mOutputs
EndProcedure
string$ = RunGetOutput(BaseDirectory$+RequestedFile$)
Den Post verarbeitet er nicht und beim GET bekomme ich diese Fehlermeldung.... was kann ich da noch machen hat da jmd. erfahrung darin oder so?
Thx4Help
MFG
Blackskyliner