I need a simple code to upload images to mySQL using PHP… short! snippet… and is it possible to upload an html, css file to mySQL?… its reason is complicated but all answers are appreciated!… EDIT:: say I have 1000 users.. and they each have their own layout for their page.. So inside their MYSQL record will be a html file, css file(possibly), and image(s)…
Share
I am a big fan of using a filesystem for storing physical files, i’ve yet to see any solid reason why they are better off in a database.
To automate this process you could have a shell script called through exec
or PHP’s native
mkdiror anything really. If you went for a structure like:essentially all i would imagine you would need to do is create a user dir, and copy into it the default versions of their site assets – images/css/html etc.
This should be easy enough to manage