1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
|
<html>
<head>
<title>Upload</title>
</head>
<body><?
if($action){
$path = "test/"; // Url zum Speicher Ordner
$filename = "";
$deindomain = "http://www.invidia-fatalis.com/";
$time=time();
if ($HTTP_POST_FILES['userfile']['tmp_name']<> 'none')
{
$file = $HTTP_POST_FILES['userfile']['name'];
$temp = $HTTP_POST_FILES['userfile']['tmp_name'];
$path_parts = pathinfo($file);
$filename = "test_" . $time . "." . $path_parts["extension"];
$dest = $path.$filename;
copy($temp, $dest);
echo "Die Datei ist auf dem Server! <br><br>";
echo "Url der Datei: <a href="$deindomain$path$filename" target="_blank">".$deindomain.$path.$filename;
echo "</a>";
}
} else { ?>
<form method="post" enctype="multipart/form-data" action="<?php echo $PHP_SELF ?>">
<input type="hidden" name="MAX_FILE_SIZE" value="400000">
<br>
<strong>File Upload</strong> <br>
<br>
<input name="userfile" type="file" size=40>
<br>
<br>
<input type="submit" name="action" value="Speichern">
</form><? } ?></body>
</html> |