You can directly a store a code into db rather then uploading files.
Because storing a file and merge a files it's huge task to compare to strings(code blocks).
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I’m thinking about building a code storing app, users can upload code probably just html and css for now.
I’ve done a bit of research and most people seem to suggest the code been put into a file and the file been stored rather than just storing code direct into the database.
What I’m want to achevieve is the user uploads code for different elements say headers, hero images, content blocks and footers etc.
Later they can log in select which elements they want headers, image, single column and footer then download the code. This will merge the code blocks together and download an html file.
Does this sound possble? The people using the app will be devs who work in our office so not too worried about injection etc.
Just looking for tips on the approach to take and see if it’s actually possible to merge files.
Thanks
Please or to participate in this conversation.