Quando eseguo il file upload.php mi da il seguente errore: Parse error: syntax error, unexpected $end in /membri/fmserver/NewsMCserver/upload.php on line 41
Codice PHP:
<?php
$seed_num = file_get_contents("seed_num.txt") + 1;
$seedt = $_REQUEST['seed'];
$upload_dir = "";
$upload_url = '';
$temp_name = $_FILES['uploadedfile']['tmp_name'];
$file_name = $_FILES['uploadedfile']['name'];
$file_path = $upload_dir.$upload_url."seed"."$seed_num".".jpg";
if(move_uploaded_file($temp_name, $file_path)) {
$seed_numjpg = "seed"."$seed_num".".jpg";
$rimpiazzo = <<<codehtml
</BODY>
<!--seed$seed_num-->
<TABLE border="1" height="size1" width="size2"><TR><TD align="center" valign="middle">
<TABLE border="0" bordercolor="#FFFFFF" cellpadding="10"><TR><TD align="center" background="bgbrick.gif">
<img src="$seed_numjpg" height="213" width="372" alt="Smiley face" border="5">
<form name="selectall$seed_num">
<center>
<input type="text" value="$seedt" readonly style="background-image: url('sign.jpg');width:274px;height:40px;font-family: Comic Sans MS;font-size: 14pt;color:black;" name="messageBody$seed_num" style="color:#ffffff" style="width:361px;height:19px;" > <input type="button" style="background-image: url('stone.jpg');height:40px;width:100px;font-family: Comic Sans MS;font-size: 12pt;color:white;" value="Select Seed" onClick="javascript:this.form.messageBody$seed_num.focus();this.form.messageBody$seed_num.select();"><a>
<br />
</center>
</TD></TR></TABLE>
</TD></TR></TABLE>
</BODY>
<!--ultimo-->
codehtml;
$filehtml = file_get_contents("index.html");
$filehtml_new = str_replace("<!--ultimo-->", "$rimpiazzo", "$index");
file_put_contents("index.html", $filehtml_new);
echo 'Seed caricato con successo !';
file_put_contents("seed_num.txt", $seed_num);
}else{
print("C'&grave stato un'errore durante l'upload");
}
?>