Subversion Repositories sysadmin_scripts

Rev

Rev 125 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 125 Rev 126
Line 77... Line 77...
77
      $targetPath .= '.info';
77
      $targetPath .= '.info';
78
      file_put_contents( $targetPath, $info );
78
      file_put_contents( $targetPath, $info );
79
   } else {
79
   } else {
80
      return "could not save file $targetPath";
80
      return "could not save file $targetPath";
81
   }
81
   }
82
   return 'Ok';
82
   return filesize($targetPath);
83
}
83
}
84
 
84
 
85
 
85
 
86
// file_put_contents( STORAGE_PATH . '/report.log', print_r( $report, true ) );
86
// file_put_contents( STORAGE_PATH . '/report.log', print_r( $report, true ) );
87
 
87
 
Line 99... Line 99...
99
foreach ( $_REQUEST as $key => $value ) {
99
foreach ( $_REQUEST as $key => $value ) {
100
   $text[] = $key . ':' . $value;
100
   $text[] = $key . ':' . $value;
101
}
101
}
102
$text = implode( "\n", $text );
102
$text = implode( "\n", $text );
103
foreach ( $_FILES as $key => $value ) {
103
foreach ( $_FILES as $key => $value ) {
-
 
104
   file_put_contents( "/tmp/uploadFile", $text );
104
   print saveFile( 
105
   print saveFile( 
105
      $value, 
106
      $value, 
106
      $path,
107
      $path,
107
      isset( $_REQUEST['filename'] ) ? sanitize_filename( $_REQUEST['filename'] ) : '',
108
      isset( $_REQUEST['filename'] ) ? sanitize_filename( $_REQUEST['filename'] ) : '',
108
      $text
109
      $text