original_string: private function moveFile()
      {
          $this->setSeveName();
  
          $files = $this->files;
  
          if ($this->formats != "" && !in_array($this->fileExt, $this->formats))
          {
              $formats  = implode(',', $this->formats);
              $message  = "Your upload file " . $files["name"] . " is " . $this->fileExt;
              $message .= " format, The system is not allowed to upload, you can only upload " . $formats . " format's file.";
  
              $this->error($message, 0, true);
  
              return false;
          }
  
          if ($files["size"] / 1024 > $this->maxSize)
          {
              $message = "Your upload file " . $files["name"] . "  The file size exceeds of the system limit size " . $this->maxSize . " KB.";
              $this->error($message, 0, true);
  
              return false;
          }
  
          // When can't covered
          if (!$this->cover)
          {
              // The same file already exists
              if (file_exists($this->savePath . $this->saveName))
              {
                  $this->error($this->saveName . $this->errors['same_file'], 0, true);
  
                  return false;
              }
          }
  
          if ( !@move_uploaded_file( $files["tmp_name"], iconv("utf-8", "gbk", $this->savePath . $this->saveName) ) )
          {
              switch ($files["error"])
              {
                  case '0':
                      $message = "File upload successfully.";
                      break;
  
                  case '1':
                      $message = "The uploaded file exceeds the value of the upload_max_filesize option in php.ini.";
                      break;
  
                  case '2':
                      $message = "The size of the upload file exceeds the value specified by the MAX_FILE_SIZE option in the HTML form.";
                      break;
  
                  case '3':
                      $message = "Only part of the file is uploaded.";
                      break;
  
                  case '4':
                      $message = "No file is uploaded.";
                      break;
  
                  case '6':
                      $message = "Can't find upload temp directory.";
                      break;
  
                  case '7':
                      $message = "Error writing file to hard drive";
                      break;
  
                  case '8':
                      $message = "An extension has stopped the upload of the file.";
                      break;
  
                  case '999':
                  default:
                      $message = "Unknown error, please check the file is damaged, whether the oversized and other reasons.";
                      break;
              }
  
              $this->error($message, 0, true);
  
              return false;
          }
  
          @unlink($files["tmp_name"]); // Delete temporary file
  
          return true;
      }
code: private function moveFile()
      {
          $this->setSeveName();
  
          $files = $this->files;
  
          if ($this->formats != "" && !in_array($this->fileExt, $this->formats))
          {
              $formats  = implode(',', $this->formats);
              $message  = "Your upload file " . $files["name"] . " is " . $this->fileExt;
              $message .= " format, The system is not allowed to upload, you can only upload " . $formats . " format's file.";
  
              $this->error($message, 0, true);
  
              return false;
          }
  
          if ($files["size"] / 1024 > $this->maxSize)
          {
              $message = "Your upload file " . $files["name"] . "  The file size exceeds of the system limit size " . $this->maxSize . " KB.";
              $this->error($message, 0, true);
  
              return false;
          }
  
          // When can't covered
          if (!$this->cover)
          {
              // The same file already exists
              if (file_exists($this->savePath . $this->saveName))
              {
                  $this->error($this->saveName . $this->errors['same_file'], 0, true);
  
                  return false;
              }
          }
  
          if ( !@move_uploaded_file( $files["tmp_name"], iconv("utf-8", "gbk", $this->savePath . $this->saveName) ) )
          {
              switch ($files["error"])
              {
                  case '0':
                      $message = "File upload successfully.";
                      break;
  
                  case '1':
                      $message = "The uploaded file exceeds the value of the upload_max_filesize option in php.ini.";
                      break;
  
                  case '2':
                      $message = "The size of the upload file exceeds the value specified by the MAX_FILE_SIZE option in the HTML form.";
                      break;
  
                  case '3':
                      $message = "Only part of the file is uploaded.";
                      break;
  
                  case '4':
                      $message = "No file is uploaded.";
                      break;
  
                  case '6':
                      $message = "Can't find upload temp directory.";
                      break;
  
                  case '7':
                      $message = "Error writing file to hard drive";
                      break;
  
                  case '8':
                      $message = "An extension has stopped the upload of the file.";
                      break;
  
                  case '999':
                  default:
                      $message = "Unknown error, please check the file is damaged, whether the oversized and other reasons.";
                      break;
              }
  
              $this->error($message, 0, true);
  
              return false;
          }
  
          @unlink($files["tmp_name"]); // Delete temporary file
  
          return true;
      }
code_tokens: private function moveFile ( ) { $ this -> setSeveName ( ) ; $ files = $ this -> files ; if ( $ this -> formats != "" && ! in_array ( $ this -> fileExt , $ this -> formats ) ) { $ formats = implode ( ',' , $ this -> formats ) ; $ message = "Your upload file " . $ files [ "name" ] . " is " . $ this -> fileExt ; $ message .= " format, The system is not allowed to upload, you can only upload " . $ formats . " format's file." ; $ this -> error ( $ message , 0 , true ) ; return false ; } if ( $ files [ "size" ] / 1024 > $ this -> maxSize ) { $ message = "Your upload file " . $ files [ "name" ] . "  The file size exceeds of the system limit size " . $ this -> maxSize . " KB." ; $ this -> error ( $ message , 0 , true ) ; return false ; } // When can't covered
   if ( ! $ this -> cover ) { // The same file already exists
   if ( file_exists ( $ this -> savePath . $ this -> saveName ) ) { $ this -> error ( $ this -> saveName . $ this -> errors [ 'same_file' ] , 0 , true ) ; return false ; } } if ( ! @ move_uploaded_file ( $ files [ "tmp_name" ] , iconv ( "utf-8" , "gbk" , $ this -> savePath . $ this -> saveName ) ) ) { switch ( $ files [ "error" ] ) { case '0' : $ message = "File upload successfully." ; break ; case '1' : $ message = "The uploaded file exceeds the value of the upload_max_filesize option in php.ini." ; break ; case '2' : $ message = "The size of the upload file exceeds the value specified by the MAX_FILE_SIZE option in the HTML form." ; break ; case '3' : $ message = "Only part of the file is uploaded." ; break ; case '4' : $ message = "No file is uploaded." ; break ; case '6' : $ message = "Can't find upload temp directory." ; break ; case '7' : $ message = "Error writing file to hard drive" ; break ; case '8' : $ message = "An extension has stopped the upload of the file." ; break ; case '999' : default : $ message = "Unknown error, please check the file is damaged, whether the oversized and other reasons." ; break ; } $ this -> error ( $ message , 0 , true ) ; return false ; } @ unlink ( $ files [ "tmp_name" ] ) ; // Delete temporary file
   return true ; }
docstring: Check and move the upload file
  
  @access  private
  @return  bool
docstring_tokens: Check and move the upload file