+ 3

I want to write external file using javascript like php is it possible? see the link below for an example

https://www.sololearn.com/learn/PHP/1846/

31st Aug 2020, 8:46 AM
Avirur Rahman
Avirur Rahman - avatar
4 odpowiedzi
+ 3
Avirur Rahman You’d have to use Node.js to write to a local file, as because JS is executed on the client’s machine there isn’t file reading/writing. However, in normal JavaScript, you could save it into a Blob() for the user to download or for it to download automatically.
31st Aug 2020, 10:01 AM
Rowsej
Rowsej - avatar
+ 2
Easy: just change the file extension to .js and then you can write your JS code in there. 😁
31st Aug 2020, 8:58 AM
Rowsej
Rowsej - avatar
+ 2
Rowsej No, I mean like creating a CRUD but without a database, the data is stored in a .txt file, can do it using php but I want to do it using javascript is it possible?
31st Aug 2020, 9:18 AM
Avirur Rahman
Avirur Rahman - avatar
+ 2
Rowsej thanks, I'll try it
31st Aug 2020, 11:41 AM
Avirur Rahman
Avirur Rahman - avatar