The PHPMVC framework skymvc supports multifile Upload ,. The PHPMVC framework skymvc supports multi-file upload. the example in this article shares the specific code of skymvc for file upload for your reference. the specific content is as follows: 1. code upload. ctrl. phpphp php mvc framework skymvc supports multifile Upload,
This article provides examples to share with you the specific code for Implementing File upload using skymvc for your reference. the specific content is as follows:
1. code upload. ctrl. php
<? Phpclass uploadControl extends skymvc {public function _ construct () {parent ::__ construct ();} public function onDefault () {$ this-> 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-> sysallowtyp E = 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 by Id; $ data = $ this-> upload-> uploadfile ("upimg "); // print_r ($ data); echo json_encode ($ data) ;}}?>
2.code upload.html
{Include file = "head.html "}{Include file = "header.html "}Upload result
{Include file = "footer.html "}