You are not logged in.
Dear visitor, welcome to Aqua Computer Forum. If this is your first visit here, please read the Help. It explains how this page works. You must be registered before you can use all the page's features. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.
|
|
Source code |
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 38 39 40 41 42 43 44 45 46 47 48 49 50 |
<?php
if($was=="doit")
{
$size = $bild_size; // Größe der Datei
$name = $bild_name; // Der Originalname
$type = $bild_type; // Der MIME Type der Datei
if(eregi("(txt|map)$",$name))
{
if(file_exists("../../files/&name"))
{
echo "File already exists!.";
}
else if($size<2000000 AND $size!=0)
{
copy($bild,"../../files/$name"); // Kopiert das Bild
echo "Your file was uploaded successfully!<br>";
echo "Size: ".$size." Byte<br>";
echo "Name: ".$name."<br>";
echo "MIME-Type: ".$type."<br>";
echo "Ansehen: <a href=../../files/$name>".$name."</a>";
}
else
{
echo "Your file is bigger than 2.000.000 bytes or equal 0 bytes or already there.";
}
}
else
{
echo "Invalid file: ".$name;
}
}
else
{
echo "<form action='".$PHP_SELF."' enctype=\"multipart/form-data\" method='post'>";
echo "<input type='hidden' name='was' value='doit'>";
echo "<table>";
echo "<tr>";
echo "<td>File: </td>";
echo "<td><input type='file' name='bild'></td>";
echo "</tr><tr>";
echo "<td> </td>";
echo "<td><input type='submit' value='Upload'></td>";
echo "</tr>";
echo "</form></table>";
}
?>
|

Mach nen $ davor dann klappts auch


-