Multi-image upload image address storage related issues

Source: Internet
Author: User
Multi-image Upload image address storage problem
Multi-image upload, click to add a picture can be added, the number can not be limited,
I've been trying to figure out how to save a picture, because I have no limit to the number of pictures in a piece of data, can not do 10 million fields in advance?
There is another I think of, but do not do, is to traverse the uploaded folder, upload remember the new folder name on the line, this will not do.
How do we all do this, pointing fingers ah!
Multi-image upload

Share to:


------Solution--------------------
Table PHOTOS
PID image ID self-increment
TID Post ID
Photoname picture file name

SELECT * from PHOTOS where tid= $tid

------Solution--------------------
$a = glob (' Upload folder/* ');
$FN = end ($a); The last file name to upload
------Solution--------------------
1. Field Rule Storage Example/images/1.jpg::::/images/2.jpg or direct Json_encode
2. Storage folder

------Solution--------------------
Multiple picture addresses separated by commas, Ming?

------Solution--------------------
A field stores information about a picture, and you can place the path of multiple graphs into JSON.
Traverse the file to see the appropriate PHP function.
------Solution--------------------
Recommended to store a time, a record of a picture, storing is the URL address, can be relative to the path
  • Related Article

    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.