Multi-image upload
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!
Reply to discussion (solution)
Table PHOTOS
PID image ID self-increment
TID Post ID
Photoname picture file name
SELECT * from PHOTOS where tid= $tid
What do you mean by your answer, great God? Take a closer look at the problem, okay?
$a = glob (' Upload folder/* ');
$FN = end ($a); The last file name to upload
Xuzuning said a little deep, explain it again, okay?
What's the best way to save a picture, directly in the directory or in MySQL?
1. Field Rule Storage Example/images/1.jpg::::/images/2.jpg or direct Json_encode
2. Storage folder
Multiple picture addresses separated by commas, Ming?
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.
Multiple picture addresses separated by commas, Ming? A comma exists to prevent users from uploading files. You can rename an uploaded file.
Recommended to store a time, a record of a picture, storing is the URL address, can be relative to the path