Answer the question
In order to leave comments, you need to log in
How to add several files (jpeg, png) to the server at once?
I need to write a website where each entry / post contains several pictures. Their number is not defined, maybe 2-3, maybe 50 at once. The question is: how to organize their storage in the database, reading from the database, and maybe adding (although I don’t think that this can cause problems if I'll deal with the rest). That is, if the post contained only one image, there would be no questions: in addition to the post id, title, and other things, the entry in the database should also have a field with a link to the file. There are several files at once, and do not add them all in one field. Can I make a separate table with photos and link it to the post by id?
Answer the question
In order to leave comments, you need to log in
1) exec / shell_exec / ... php.net/manual/ru/ref.exec.php
2) php.net/manual/ru/book.curl.php
https://incarnate.github.io/curl-to -php/
It is better not to store image files in the database, but to store the association of the post identifier with the file path to the image in the database.
And the pictures themselves are stored on a separate file server.
So it will be easier / faster to give them away.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question