habe meine Upload-Seite umgeändert und erhalte nun einen Fehler beim Upload.
Fehlermeldung:
Code: Alles auswählen
Parse error: syntax error, unexpected ';', expecting T_PAAMAYIM_NEKUDOTAYIM in /home/webpages/lima-city/*USER*/html/upload.php on line 106
In der Zeile 100 - 126 steht in der upload.php
Code: Alles auswählen
<?
$a = 0;
if (isset($_POST['action']) && $_POST["action"]){
$filename = "";
if ($_FILES['userfile']['tmp_name']<> 'none'){ $file = $_FILES['userfile']['name'];
$temp = $_FILES['userfile']['tmp_name']; $path_parts = pathinfo($file); $filename
= "datei_" . time() . "." . $path_parts["extension"]; if($_FILES['userfile']['size']
<= $groessemax*1024){ if(decoct(fileperms($img_path_up))==40777){ if(@copy($temp,
$img_path_up.$filename)){ echo '<div style="color:green;">
Datei ist auf den Server!<br>'; echo 'Url der Datei: <a href="http://'.$_SERVER['HTTP_HOST'].$path.$filename.'" target="_blank">
http://'.$_SERVER['HTTP_HOST'].$path.$filename.'</a><br><br><a href="'.$_SERVER['PHP_SELF'].'">
Eine weitere Datei auf den Server laden...</a><br><br></div>
'; } else { echo '<div style="color:red;">Die Datei konnte
nicht auf den Server geladen werden. <a href="'.$_SERVER['PHP_SELF'].'">Noch
mal versuchen...</a><br><br></div>'; } } else { echo '<div style="color:red;">
Der Upload Ordner hat keine Schreibrechte! <a href="'.$_SERVER['PHP_SELF'].'">
Noch mal versuchen...</a><br><br></div>'; } } else { echo '<div style="color:red;">
Die Datei ist zu groß! Die Datei darf nicht größer als '.$groessemax.' KB (KiloByte)
sein. <a href="'.$_SERVER['PHP_SELF'].'">Noch mal versuchen...</a><br><br></div>
'; } } } else { ?>
<form method="post" enctype="multipart/form-data" action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]); ?>
<form method="post" enctype="multipart/form-data" action="/upload.php">
die Datei darf nicht größer sein als 1000000 KB (KiloByte).<br><br>
<input name="userfile" type="file" size="40"><br><br>
<input type="submit" name="action" value="Upload It!">
</form>
<? } ?>
Gruß
//EDIT
nach der Code da oben steht nochmals gleich dadrunter
Code: Alles auswählen
<form method="post" enctype="multipart/form-data" action="/upload.php">
die Datei darf nicht größer sein als 1000000 KB (KiloByte).<br><br>
<input name="userfile" type="file" size="40"><br><br>
<input type="submit" name="action" value="Upload It!">
</form>
