Hello,
I am currently trying to write a favourites script which will store all the information on a .txt file using the following line of code,
$file = fopen("mytextfile.txt","w");
All works great apart from one tiny problem...
Every time i reload the page it re-creates the .txt file and deletes all the content.
I need the code to create a .txt file if one doesn't exist (and skip the creation if one does) then run the rest of my program.
My guess so far is this...
If 'text file' doesn't exist, create one then run rest of code.
If 'text file' does exist, simply run the rest of the code.
Any advice, please? 🙂