Answer the question
In order to leave comments, you need to log in
How is the file system organized in PHP?
I just started learning PHP yesterday. I wrote a simple program for the practice of working with files:
1 - Open the file -> read the number -> display it
2 - The user presses the button -> increase the number
3 - Write the new number to the file -> Save
Calculation that different users together influence to that same number. And if two users access the file at the same time, will an error occur? Or is there some kind of protection in PHP?
Answer the question
In order to leave comments, you need to log in
use flock to avoid stale data
ru2.php.net/manual/ru/function.flock.php
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question