pb怎样和asp或者php后台进行数据交互?
用pb做了一个cs应用,需要跟web(用php开发的)进行交互,不知道用什么进行交互?求思路
[解决办法]
Description
Performs an HTTP Post, allowing a PowerBuilder application to send a request through CGI, NSAPI, or ISAPI.
Controls
Inet objects
Syntax
servicereference.PostURL ( urlname, urldata, headers, {serverport, } data )
ArgumentDescription
servicereferenceReference to the Internet service instance.
urlnameString specifying the URL to post.
urldataBlob specifying arguments to the URL specified by urlname.
headersString specifying HTML headers. In Netscape, a newline (~n) is required after each HTTP header and a final newline after all headers.
serverport
(optional)Specifies the server port number for the request. The default value for this argument is 0, which means that the port number is determined by the system (port 80 for HTTP requests).
dataInternetResult instance into which the function returns HTML.
Return value
Integer. Returns values as follows:
1 Success
-1 General error
-2 Invalid URL
-4 Cannot connect to the Internet
-5 Unsupported secure (HTTPS) connection attempted
-6 Internet request failed
[解决办法]
少了点代码
iir_msgbox = CREATE n_ir
int li_rc
iinet_base = create inet
li_rc = getcontextservice( "internet", iinet_base )
if li_rc <> 1 then
//
end if