Dear respective developer across the globe,
information as you can to not only help me out, but also others around the
world.
I will divide my questions so it's easier to understand what i'm asking for
and allow you to answer the questions individually for better
understanding.
My questions is:
a)
b)
Can a textfile get views by let say 1000000 as same time? i'm talking about viewed not created here.
The number of files is not limited at all by the operating system or by php.
But is is limited by the file system you safe the files in. The exact numbers depend on the type of file system and its configuration. Typical limits are 32000 inodes in a single directory. But as mentioned that can be configured.
What is typically done in such cases is that you spread all those files over directories, where the directories are named by a substring of the file name itself. So for example the file somegoodguy.txt
is saved under /som/ego/odg/somegoodguy.txt
. Provided you have a more or less equal usage of characters that should prevent that you hit any limits, since the files are equally spread over many, many folders.
However:
It is questionable if that is a good approach at all. File based storage is not exactly efficient. You get a much better performance if you use a database instead. One entry (row) per user in a database table. Accessing that information is really efficient and fast. And you don't have to worry about any limits.