I’m new to PHP and just faced the problem with creating and opening a file with fopen(). Here is my code: When I try to run the file by opening it in the browser I see the next message: ‘Cannot create a file’. But when I start debug session everithing works as it supposed to. I suspect that there is
Tag: file-access
How can I prevent a race condition when using a file based counter in php?
I have a small web-page that delivers different content to a user based on a %3 (modulo 3) of a counter. The counter is read in from a file with php, at which point the counter is incremented and written back into the file over the old value. I am trying to get an even distribution of the content in