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 "}