stimmt hehe
Fehlermeldung:
Warning: copy(c): failed to open stream: No such file or directory in C:\apache\htdocs\works\design1\admin\show.php on line 48
Die Datei checkout_bullet.gif wurde erfolgreich hochgeladen!
Fehlermeldung:
Warning: copy(c): failed to open stream: No such file or directory in C:\apache\htdocs\works\design1\admin\show.php on line 48
Die Datei checkout_bullet.gif wurde erfolgreich hochgeladen!
Code:
<?
require('inc/inc_db.php');
require('inc/lang/german/index.php');
///////// bild upload /////////////
// ordner name wo es upgeloadet wird
//$tempname = $_FILES['file']['tmp_name'];
$tempname = "images/".$name['name'];
// datei name
$name = $_FILES['file']['name'];
// prüfung der dateiformate
$type = $_FILES['file']['type'];
$size = $_FILES['file']['size'];
// prüfung von grösse und datei typ
// html kann leicht gekratt werden daher php funktion
if($type != "image/gif" && $type != "image/jpeg") {
$err[] = "nur gif und jpeg Dateien dürfen hochgeladen werden.";
}
if($size > "15000") {
$err[] = "Die Datei welche Sie hochladen wollen, ist zu gross!<br>Maximale Dateigrosse beträgt 15 KB!";
}
?>
<html>
<head>
<title><? TITLE; ?></title>
<link rel="stylesheet" type="text/css" href="style.css">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<table width="100%">
<tr>
<td colspan="2"><? include('inc/header.php'); ?></td>
</tr>
<tr>
<td width="11%" rowspan="2" valign="top"><? include('inc/navibox.php'); ?></td>
<td class="maintop"><? echo SHOW; ?></td>
</tr>
<tr>
<td valign="top" class="main">
<?
// upload
if(empty($err)) {
copy($name['tmp_name'],$tempname);
echo "Die Datei $name wurde erfolgreich hochgeladen!";
}
// kein upload
else {
foreach($err as $error)
echo "$error<br>";
}
?>
<form enctype="multipart/form-data" action="show.php" method="post">
<input type="file" name="file"><br>
<input type="submit" value="hochladen">
</form>
</td>
</tr>
</table>
</body>
</html>