Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
File Transfers to a Web Site
Message
From
14/05/2004 00:46:25
 
 
To
13/05/2004 15:58:25
Mike Smith
Doncaster Office Services
Oakville, Ontario, Canada
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00902945
Message ID:
00903958
Views:
20
>Denis:
>
>I have put in the details of my application. I have not used XML because I can't get that to work at all and from what I can see it doesn't make the files any smaller anyway.
>
>So I have used code as below.
>
>I had expected that this would put a file called accesstemp.txt up on my web server. The code runs without error but there is nothing on the web server after it completes.
>
>Can you see what I am doing wrong? Thanks
>
>Mike Smith
>
>
>FFF = FILETOSTR("c:\temp4\access1w.dbf")
>STRTOFILE(FFF, "ACCESSTEMP.TXT") && Writes the contents of a character string to a file.
>
>OHTTP = CREATEOBJECT("wwIPstuff")
>LNRESULT = OHTTP.HTTPCONNECT("www.doncasteroffice.net/rentmast")
>
>IF LNRESULT # 0
> WAIT WINDOW "Something is wrong"
> RETURN
>ENDIF
>
>OHTTP.NHTTPPOSTMODE = 2 && multipart forms
>OHTTP.ADDPOSTKEY("AccessUpload", "ACCESSTEMP.txt", .T.)
>* "AccessUpload" is key value,
>* "ACCESSTEMP.txt" is a file name (because oHTTP.nHttpPostMode = 2) multipart forms,
>* .t. means the second parameter is a file name that is to be uploaded to the server
>
>WAIT "Please wait .... request processing .... " WINDOW NOWAIT
>LCHTML = OHTTP.HTTPGET("www.doncasteroffice.net/rentmast")
>OHTTP.HTTPCLOSE()
Previous
Reply
Map
View

Click here to load this message in the networking platform