Skymvc file Upload supports multifile upload-PHP source code

Source: Internet
Author: User
Skymvc file Upload supports multi-file upload to [1] [2] [3] [full screen preview]
 Smarty-> display ("upload/default.html");} public function onUpload () {$ this-> loadClass ("upload "); // the uploaded file directory $ this-> upload-> uploaddir = "attach/my/"; // The file size that can be uploaded $ this-> upload-> maxsize = 4194304000; // whether to upload an image $ this-> upload-> upimg = true; // you can specify the file type that can be uploaded. $ this-> upload-> sysallowtype = array ('GIF ', 'jpg ', 'bmp', 'PNG ', 'jpeg', 'txt ', 'MPEG', 'Av', 'rm ', 'rmvb', 'wmv ', 'flv', 'mp3', 'wav ', 'wm', 'swf', 'Doc', 'PDF ', 'Zip', 'Tar ', 'svg '); $ this -> Upload-> allowtype = $ this-> upload-> sysallowtype; // store $ this-> upload-> iddir = 0 based on the Id; $ data = $ this-> upload-> uploadfile ("upimg"); // print_r ($ data); echo json_encode ($ data) ;}}?>

2.[Code]Upload.htmlJump to [1] [2] [3] [full screen preview]

{Include file = "head.html "}{Include file = "header.html "}

Upload result

{Include file = "footer.html "}

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.