|Home » Technical Support » Elevate Web Builder Technical Support » Support Forums » Elevate Web Builder General » View Thread|
|Messages 1 to 3 of 3 total|
|read and write to text file on server ?|
|Thu, Jul 6 2017 5:52 AM||Permanent Link|
How is it possible to read and write to a text file on the server using EWB from client app
e.g. "data.txt" stored on the Web Server in folder C:\web\app\datastore
Ideally i would need to read / write a line at time and to control the line no of each read / write
(e.g. decide at which line no to read / write data).
1. is it using the reader and writer functions of EWB or is there a better way?
2. a simple code example or pointers to how would be helpful.
thank you in advance.
|Thu, Jul 6 2017 6:43 AM||Permanent Link|
> How is it possible to read and write to a text file on the server using EWB from client app
> e.g. "data.txt" stored on the Web Server in folder C:\web\app\datastore
You need to have some code on the server that allows you to do this. Preferably in some sort of controlled manner so that the data cannot be accessed by anyone who doesn't have permission.
If you are using the EWB server, I believe you can write a module for it to do this sort of thing. You'd then call that using TRequest's to make things happen.
|Thu, Jul 6 2017 11:38 AM||Permanent Link|
Tim Young [Elevate Software]
Elevate Software, Inc.
<< 1. is it using the reader and writer functions of EWB or is there a better way? >>
Which functions are you referring to ? EWB is client-side only, for the most part. IOW, the only thing that you use on the server side is Delphi, C#, etc.
<< 2. a simple code example or pointers to how would be helpful. >>
Check out the PDF Module Example project that is provided with EWB. That will show you the skeleton of what you need for an EWB Web Server module (native Delphi code) that responds to specific requests. The rest you need to code because it has nothing to do with EWB and is just general Delphi development.