Пример #1
0
 /**
  * Simulate uploading a file so that it will trick a form handler to think a file upload failed
  * @param string $varname the form name expected
  * @param string $filename the file name expected
  * @param string $mimetype the mime type the file is expcted to be
  */
 function UploadInvalidFile($varname, $filename, $mimetype = "text/plain")
 {
     // set request to testmode so we can fake an upload
     RequestUtil::$TestMode = true;
     $_FILES[$varname] = $this->GetUploadStructure($varname, $filename, $mimetype, 4);
 }