Upload script
Hej jeg har fået problemer med mit gamle upload script, og jeg kan ikke se mig ud af det. Er der ikke nogle som vil hjælpe mig :)<html>
<head>
<title>Upload</title>
</head>
<body bottommargin="0" leftmargin="0" topmargin="0" rightmargin="0" bgcolor="#ece9d8">
<table cellspacing="0" cellpadding="1">
<tr>
<td colspan="3"><strong>:: insert image ::</strong></td>
</tr>
<tr id="put_menu">
<td colspan="3">
<table cellspacing="0" cellpadding="1">
<form action="?do=upload" method="post" enctype="multipart/form-data">
<tr>
<td align="right" width="80">source:</td>
<td><input name="userfile" type="file" style="width:200;" /></td>
<td rowspan="3"><input style="font-size:12;" name="submit" type="submit" value=":: upload ::"></td>
</tr>
<tr>
<td align="right">folder:</td>
<td>
<select style="width:200;" name="dir">
<option value="./">@Home</option>
<option value="images/">@Home/images</option>
<option value="images/icons/">@Home/images/icons</option>
<option value="upload/">@Home/Upload</option>
</select>
</td>
</tr>
<tr>
<td align="right">Status : </td>
<td>
<?
if($_GET['do'] == 'upload')
{
if(!(copy($_FILES['userfile']['tmp_name'], $_POST['dir'] . $_FILES['userfile']['name']))) die("Cannot upload files.");
echo "Upload Complete!";
} else{
?>No files to upload yet<?
}
?>
</td>
</tr>
</form>
</table>
</td>
</tr>
</table>
</body>
</html>
Status :
Warning: copy(images/map.jpg) [function.copy]: failed to open stream: No such file or directory in /usr/home/web/web108639/netacad/setup/upload.php on line 36
Cannot upload files.
