Search code examples
javascriptread-write

How is read/write a text file possible in javascript if my text file is stored in server?


i am trying to read a file from the server and then write back to that same file again using javascript. Is it possible to read/write the text file using JSON,Javascript or Ajax.


Solution

  • JavaScript is client-side language, so it don't have access to server. To do it you have to use AJAX and some server-side language, eg. PHP to handle requests.