Multi-image upload image address storage problem multi-image Upload
Upload multiple images. click next to add an image. the number of images cannot be limited,
I have never figured out how to store the image address. because there is no limit on the number of images in one piece of data, I cannot create 10000000 fields in advance?
There is another one that I think of but won't do. it is to traverse the uploaded folder. remember the name of the newly created folder during the upload. this won't happen.
How do you do this!
Reply to discussion (solution)
Table PHOTOS
PID Image ID auto-increment
TID Post ID
PHOTONAME image file name
Select * from PHOTOS where TID = $ tid
What does your answer mean. Can you take a closer look at the problem?
$ A = glob ('upload folder /*');
$ Fn = end ($ a); // name of the last uploaded File
Xuzuning is a bit deep. can you explain it again?
Which method is better to store images, directly store directories or store MYSQL images?
1. field normalization storage example/images/1.jpg::::/images/2.jpg or directly json_encode
2. storage folder
Separate multiple image addresses with commas?
One field stores the image information. you can put the path of multiple images in json.
Traverse the file and check the corresponding php function.
Separate multiple image addresses with commas? To prevent users from uploading files with commas. You can rename the uploaded file.
We recommend that you record an image with a url address.