Questions about how to store the image address for multiimage uploads

Source: Internet
Author: User
Multi-image upload image address storage problem multi-image upload: click next to add an image. the number of images cannot be limited. I still cannot figure out how to store the image address because there is no limit on the number of images in one piece of data, cannot we 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 store images uploaded from multiple images?
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!
Upload and share multiple images:
------ Solution --------------------
Table PHOTOS
PID Image ID auto-increment
TID Post ID
PHOTONAME image file name

Select * from PHOTOS where TID = $ tid

------ Solution --------------------
$ A = glob ('upload folder /*');
$ Fn = end ($ a); // name of the last uploaded File
------ Solution --------------------
1. field normalization storage example/images/1.jpg::::/images/2.jpg or directly json_encode
2. storage folder

------ Solution --------------------
Separate multiple image addresses with commas?

------ Solution --------------------
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.
------ Solution --------------------
We recommend that you record an image with a url address.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.