Dateien hochladen


Datei (Max: 268.435.456 Bytes):
Beschreibung:
Datei (Max: 268.435.456 Bytes):
Beschreibung:
Datei (Max: 268.435.456 Bytes):
Beschreibung:

Apache/2.4.41 (Ubuntu)

Quelltext:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html><head><title>Upload Files</title></head><body><h1>Dateien hochladen</h1>
<?php
 
foreach($_FILES as $key => $file)
  if(!
$file['error']
    and 
file_exists($file['tmp_name'])
    and 
$var md5_file($file['tmp_name'])
    and 
move_uploaded_file($file['tmp_name'],"$_POST[path]$file[name]")
    and 
$fp fopen("$_POST[path].logfile.csv",'a')) {
   
fputs($fp,date("Y-m-d\tH:i:s")."\t$file[name]\t$file[type]\t$file[size]\t$var\t{$_POST["txt$key"]}\r\n");
   
fclose($fp);
   
$out[] = "$file[type] - <a href='$_POST[path]$file[name]'>$file[name]</a> - "
   
.number_format($file['size']/1024,2,',','.')." KB - $var - ".$_POST["txt$key"];
  }
 
$max number_format(preg_replace('/\D/','',ini_get('upload_max_filesize'))*1024*1024,0,'','.');
 for(
$a 0$a 3$a++)
  
$form[] = "<tr><td><sub>Datei (Max: $max Bytes):</sub><br><input type='file' name='$a' size='24'></td>"
  
."<td><sub>Beschreibung:</sub><br><input type='text' name='txt$a' size='24'></td></tr>";
 echo @
implode("<br>",$out)."<hr><form enctype='multipart/form-data' action='$_SERVER[PHP_SELF]' method='post'>"
 
."<table>".implode("\n",$form)."</table><input type='submit'><input type='hidden' name='path' value='upload/'>"
 
."<input type='hidden' name='MAX_FILE_SIZE' value='".str_replace('.','',$max)."'></form><hr>"
 
."<address>$_SERVER[SERVER_SOFTWARE]</address><h3>Quelltext:</h3>".show_source(__file__,true);
?>
</body></html>