Writing to file without window being open

When writing to a file using a Flask application, does it save the file being written to?

1 Like

Hi @wolfieboy09, welcome to the community!

Yes, writing to a file gets saved in a Flask application with a webview.

1 Like

Welcome to the forums, @wolfieboy09!

I’m really not sure. I wrote to a file using PHP and when another user ran the Repl, it didn’t save the file.

If you are writing to the file for database purposes, I would consider you using Replit’s database, which works for Flask.

When the repl has a webview, changes made to files in the website are reflected in the repl files, as it is not a ghost fork.
However, when it’s a console repl, file changes are not saved, and do not happen to the original repl.

1 Like

Well, it will save to the database just like other files.
Just consider that open function to be same as that in normal python.

But I tried it with a PHP server and it didn’t work!!!

1 Like

Did it have a website

PHP server means website

1 Like

But did it have a webview?

Yes, it did. It had a fully-functioning webview and you don’t want to know what it does.

I wasn’t, but now I am

If you really want to know what it does, send me a PM.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.