コード例 #1
0
ファイル: File_Upload_old2.php プロジェクト: myknotruby/ant
 /**
  * 上传文件
  * @return string
  */
 public function uploadFile()
 {
     if ($this->checkError() && $this->checkSize() && $this->checkExt() && $this->checkMime() && $this->checkTrueImg() && $this->checkHTTPPost()) {
         $this->checkUploadPath();
         $this->uniName = $this->getUniName();
         $this->destination = $this->uploadPath . '/' . $this->uniName . '.' . $this->ext;
         if (@move_uploaded_file($this->fileInfo['tmp_name'], $this->destination)) {
             return $this->destination;
         } else {
             Reponse::show(716, 'move file error');
             //$this->error='文件移动失败';
             //$this->showError();
         }
     }
     //else{
     //	$this->showError();
     //}
 }