![]() |
|
|||||||
| Home | Register | FAQ | Members List | Search | Today's Posts | Mark Forums Read |
| Questions & Help Needed Post any question regarding Basic4ppc. |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Hi, I'm trying to upload a simple text file using the http method to a folder on my server which has 'write' permissions set. The following code does not produce an error, but the file does not arrive on the server. Does Anyone have any ideas?
Tks, Adrian Sub Globals Dim dataReceived Dim orderText Dim orderString Dim orderLength Dim orderNumber Dim orderNumberLine Dim endIndex Dim orderFile Dim Buffer(4096) As byte End Sub Sub App_Start 'create file FileOpen (c1,"test.txt",cWrite,,cASCII) FileWrite (c1,"test") FileClose (c1) 'upload file Response.New1 Request.New1("http://[server domain]/[server folder]/test.txt") Request.Method = "PUT" Writer.New1(Request.GetStream,true) FileOpen(c1,"test.txt",cRandom) Reader.New1(c1,true) 'Reads the local file. count = Reader.ReadBytes(buffer(),4096) Do While count > 0 Writer.WriteBytes2(buffer(),0,count) count = Reader.ReadBytes(buffer(),4096) Loop FileClose (c1) Request.GetResponse 'UploadFile(orderFile, URL) End Sub |
|
||||
|
PUT method is not supported by all servers and you may need to first configure your server.
Maybe this page might help you: Configuring your WWW server to understand the PUT method You can also consider using the FTP library instead. |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Best way to read text file. | ikaplan | Questions & Help Needed | 8 | 11-04-2008 04:36 PM |
| Coverting text files with binary file page code functionality | kolbe | Code Samples & Tips | 1 | 06-21-2008 06:06 PM |
| Display large text file | JamesC | Questions & Help Needed | 3 | 03-08-2008 03:45 AM |
| Degree symbol in text file | derez | Bug Reports | 3 | 07-06-2007 10:22 AM |
| open a text file with Word | mwaite | Questions & Help Needed | 6 | 06-16-2007 10:03 AM |