Konvertering fra linux til win???
Giver det særlige problemer at konvertere fra linux til win? Mit upload script virker i hvert fald ikke... Nogen der ved hvorfor???<html>
<head>
<LINK REL="stylesheet" TYPE="text/css" HREF="style.css">
</head>
<body text="#D14720" LINK="#D14720" ALINK="#630101" VLINK="#D14720" marginheight="0" topmargin="0" marginwidth="0" leftmargin="0">
<table border=0 width=100% height=100% BGCOLOR=#EDDEC7 cellpadding=0 cellspacing=0><tr><td>
<?
$sizelimit = "yes"; //Do you want a size limit, yes or no?
$sizebytes = "500000"; //size limit in bytes
$absolute_path = "opgaver/$fag"; //Absolute path to where files are uploaded
?>
<div class=normal>
upload, tak</div>
<br>
<br>
<form method=POST action=doupload enctype=multipart/form-data>
<table border=0 width=420><tr>
<td width=140><div class=menu>Dit navn:</div></td><td width=280><input type=text name='navn' class=but SIZE=40 MAXLENGTH=100></td>
</tr><tr>
<td width=140><div class=menu>E-mail:</div></td><td width=280><input type=text name='mail' class=but SIZE=40 MAXLENGTH=100></td>
</tr><tr>
<td width=140><div class=menu>Fag:</div></td><td width=280><select name='fag' class=but><option value=anden_kat>Anden kategori</option></select></td>
</tr><tr>
<td width=140><div class=menu>Karakter:</div></td><td width=280><select name='karakter' class=but><option value=nej>Ikke opgivet</option><option value=6>6</option><option value=7>7</option><option value=8>8</option><option value=9>9</option><option value=10>10</option><option value=11>11</option><option value=13>13</option></select></td>
</tr><tr>
<td width=140><div class=menu>Skole:</div></td><td width=280><select name='skole' class=but><option value=handelsskole>Handelsskole</option><option value=gymnasie>Gymnasium</option><option value=htx>Teknisk gymnasium</option><option value=folkeskole>Grundskole</option></select></td>
</tr><tr>
<td width=140><div class=menu>Titel:</div></td><td width=280><input type=text name='titel' class=but SIZE=40 MAXLENGTH=100></td>
</tr><tr>
<td width=140 valign=top><div class=menu>Beskrivelse:</div></td><td width=280><TEXTAREA class=but ROWS=10 COLS=40 name='beskrivelse' value='beskrivelse'></TEXTAREA></td>
</tr><tr>
<td width=140><div class=menu>Vælg fil:</div></td><td width=280><input type=file name=file class=but size=30></td>
</tr><tr>
<td width=140><br><button name=submit type=submit class=but>Upload</button></td>
</tr></table>
<?
//File Upload
$db = mysql_connect("xxx","root");
mysql_select_db("xxx",$db);
$dato = time();
$godkendt = "0";
switch($action) {
case "doupload":
$dir = "dir";
if ($file != "") {
if (file_exists("$absolute_path/$file_name")) {
die("<br>Filen eksisterer allerede i vores arkiv.");
}
if (($sizelimit == "yes") && ($file_size > $sizebytes)) {
die("<br>Filen er for stor. Den må højest fylde $sizebytes bytes!");
}
@copy($file, "$absolute_path/$file_name") or die("Filen kunne ikke uploades!");
mysql_query("INSERT INTO opgaver (titel,fil_navn,navn,mail,fag,karakter,beskrivelse,dato,type,skole,size,godkendt) VALUES ('$titel','$file_name','$navn','$mail','$fag','$karakter','$beskrivelse','$dato','$file_type','$skole','$file_size','$godkendt')");
} else {
die("<br>Vælg venligst en fil at uploade");
}
echo "<br>Opgaven <i>".$file_name."</i> blev lagt op!<br>Vi siger mange gange tak for behjælpeligheden...";
echo "<br>";
break;
}
?>
</td></tr></table>
</body>
</html>
