Pilly
Lt. Commander
- Registriert
- Juli 2004
- Beiträge
- 1.268
Ich weiß nicht, wo hier der Fehler in dem Uploadskript liegt. Kann mit evtl. jemand helfen?
PHP:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>Upload Skript</title>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
</head>
<body>
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
<input type="file" name="datei" /><br />
<input type="submit" value="Upload beginnen" />
</form>
<?php
//Formular auswerten
if (!empty($_FILES['datei'])) {
$filename=$_FILES['datei']['name'];
if (copy($_FILES['datei'], "$_SERVER['PHP_SELF']/files")) {
echo "Upload war erfolgreich";
}
else {
echo "Upload war leider nicht erfolgreich. ".
"Versuche es nocheinmal oder kontaktiere den Webmaster.";
}
}
?>
</body>
</html>