PHP instance multi-File upload instance Code _php tutorial

Source: Internet
Author: User
PHP instance multi-File upload instance code
A = $ (' ' +multifile.string.file.replace (' $file ', V.match (/[^/]+$/GI) [0]) + ''),

This is the new code structure.

Take out the picture format.

ext = String (V.match (/.w{1,4}$/gi));

The v variable is the path address, so it can be displayed directly with IMG.

var IMGs = (ext== '. jpg ' | | ext== '. gif ' | | ext== '. png ')? ': ';

Starting with ' +imgs+ ', that's what I added.

A = $ (' +multifile.string.file.replace ' ('$file ', V.match (/[^/]+$/GI) [0]) + ' +imgs+ ' click Insert '),

B = $ (' +multifile.string.remove+ ');
Copy Code

Untitled Document

Partial test: List Content


Copy code//for editing, key name Key will be calculated starting from 0. So it's important to get the last Rsok value of the attachment.

var int_s=$ ('. A_b:last '). attr (' Rsok ');

Bind functionality to the first element

if (! Multifile.multifile) Multifile.addslave (MULTIFILE.E, 0);
Copy Code


http://www.bkjia.com/PHPjc/445028.html www.bkjia.com true http://www.bkjia.com/PHPjc/445028.html techarticle PHP instance multiple file Upload instance code//a = $ (' span class=multifile-title title= ' +multifile.string.selected.replace (' $file ', V) + ' + MultiFile.STRING.file.replace (' $file ', V.match (/[^ ...

  • 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.