欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  php教程

skymvc文件上传支持多文件上传

程序员文章站 2022-06-09 15:40:55
...
跳至 [1] [2] [3] [全屏预览]
smarty->display("upload/default.html");
	}
	
	public function onUpload(){
		
		$this->loadClass("upload");
		//上传的文件目录
		$this->upload->uploaddir="attach/my/";
		//允许上传的文件大小
		$this->upload->maxsize=4194304000;
		//是否上传图片
		$this->upload->upimg=true;
		//设置允许上传的文件类型
		$this->upload->sysallowtype=array('gif','jpg','bmp','png','jpeg','txt','mpeg','avi','rm','rmvb','wmv','flv','mp3','wav','wma','swf','doc','pdf','zip','tar','svg');
		$this->upload->allowtype=$this->upload->sysallowtype;
		//根据Id存储
		$this->upload->iddir=0;
		$data=$this->upload->uploadfile("upimg");
		//print_r($data);
		echo json_encode($data);	
		
	}
	
	
	
}

?>