postdata; return json_encode($str); } public function upfileAction() { if(!$_FILES)exit('sorry!'); $upimg = c('upfile'); $maxsize= (int)$this->get('maxsize', 5); $uptype = $this->get('uptype', '*'); $thumbnail = $this->get('thumbnail'); $upimg->initupfile($uptype, ''.UPDIR.'|'.date('Y-m').'', $maxsize); $upses = $upimg->up('file'); $arr = c('down')->uploadback($upses, $thumbnail, false); $this->returnjson($arr); } }