Batch upload of images. the code used in the 9th Street album function can be used to upload images in batches at one time. The following is an example. if you do not understand the implementation process, leave a message to me and check with each other.
Batch upload of images. the code used in the 9th Street album function can be used to upload images in batches at one time. The following is an example. if you do not understand the implementation process, leave a message to me, you can discuss with each other...
- Upload picture more once
- If ($ _ POST ['upload'] = 'send '){
- $ Dest_folder = "picture /";
- If (! File_exists ($ dest_folder )){
- Mkdir ($ dest_folder );
- }
- Foreach ($ _ FILES ["pictures"] ["error"] as $ key => $ error ){
- If ($ error = UPLOAD_ERR_ OK ){
- $ Tmp_name = $ _ FILES ["pictures"] ["tmp_name"] [$ key];
- $ Name = $ _ FILES ["pictures"] ["name"] [$ key];
- $ Uploadfile = $ dest_folder. $ name;
- Move_uploaded_file ($ tmp_name, $ uploadfile );
- }
- }
- }
- ?>
The above code is all PHP programming for uploading images in batches, and I hope to help anyone who needs it.