Fejl i PHP script: Upload
Jeg har dette script...Der er blot en fejl på linie 29:
copy($fil,"files/$fil_name");
Hvad skal der stå ???
<form enctype="multipart/form-data" action="<? echo "$php_self"; ?>" method="post">
<table width="300">
<tr>
<td width="300" colspan="2"><b>Upload</b></td>
</tr><tr>
<td width="80">Kodeord:</td>
<td width="220"><input type="text" name="kodeord" style="width: 220px"></td>
</tr><tr>
<td width="80">Browse:</td>
<td width="220"><input type="file" name="fil" style="width: 220px"></td>
</tr><tr>
<td width="300" colspan="2" align="right"><input type="submit" name="upload" value="Upload"></td>
</tr>
</table>
</form>
<?
if ($upload) {
if ($fil == ""){
echo "<font color=\"red\">Du har ikke valgt nogen fil</font>";
} else if ($kodeord != "krambamboli"){
echo "<font color=\"red\">Kodeordet er ikke korrekt</font>";
} else {
copy($fil,"files/$fil_name");
echo "<font color=\"darkgreen\">Filen blev uploadet</font>";
}
}
?>
Den giver disse fejl...
Warning: open_basedir restriction in effect. File is in wrong directory in /var/www/hotels/1go/dumazz/html/uploadvideo.php on line 29
Filen blev uploadet
