I have a PHP application that takes objects from users, and stores them on a server. Similar to an upload-download service. The object could vary from just a string of text,to any kind of media object like a movie, songs etc. Even if a simple text is sent, the size of the text sent could be big (probably an entire ebook). At present, the way I'm doing this is, write all these data to files, because files don't impose a size limit.
Edit: To clarify, I'm looking for a generic and efficient way for storing data, no matter what the format. For example, a user could send the string, "Hi, I am XYZ". I can store this using file operations like "fopen", "fwrite". If a user sends an MP3 file, I can again use "fwrite" and the data of the file will be written as is, and the MP3 format is not disturbed. This works perfectly at present, no issues. So "fwrite" is my generic interface here.
My question: Is there some better, efficient way to do this?
Thanking you for your help!