| witerleitung |
heyo
Pixelschubser
Beiträge: 6
|
kleine Frage zum Thread Link
Kann mir bitte jemand sagen wo ich den code
1:
2: | $url = "http://www.formel1.de";
header("Location: $url); |
einbauen muss?
Skript:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119: | <?php
$upload_dir = "/html/uploadbilder";
if (isset ($_GET["step"]))
$step = $_GET["step"];
else
$step = 1;
switch ($step)
{
case 1:
?>
<form name="form1" method="post" action="<?php echo $_SERVER["PHP_SELF"] ?>?step=2">
<table width="100%" border="0" cellspacing="2" cellpadding="0">
<tr valign="top">
<td width="250" bgcolor="#666666"> <strong><font color="#FFFFFF">Wieviele
Bilder wollen Sie uploaden?</font></strong></td>
<td bgcolor="#CCCCCC">
<input name="ii" type="text" id="ii" size="8">
<font color="#FF0000" size="2">Beliebige
Zahl eingeben...</font>
</td>
</tr>
<tr valign="top">
<td width="250" bgcolor="#666666">
<strong><font color="#FFFFFF">weiter zu
Schritt Zwei...</font></strong>
</td>
<td bgcolor="#CCCCCC">
<input name="step2" type="submit" id="step2" value="Schritt 2">
</td>
</tr>
</table>
</form>
<?php
break;
case 2:
if (isset ($_POST["step2"]))
{
$ii = $_POST["ii"];
?>
<form action="<?php echo $_SERVER["PHP_SELF"] ?>?step=3"
method="post" enctype="multipart/form-data" name="form1">
<table width="100%" border="0" cellspacing="2" cellpadding="0">
<tr valign="top">
<td width="250" bgcolor="#666666">
<strong><font color="#FFFFFF">Bitte fügen
Sie die Dateien ein!</font></strong>
</td>
<td bgcolor="#CCCCCC"> </td>
</tr>
<?php
for ($i=1; $i <= $ii; $i++)
{
echo "<tr valign=\"top\">\n";
echo " <td width=\"250\" bgcolor=\"#666666\">\n";
echo " <strong><font color=\"#FFFFFF\">Datei Nr. $i</font></strong>\n";
echo " </td>\n";
echo " <td bgcolor=\"#CCCCCC\">\n";
echo " <input name=\"file[]\" type=\"file\" id=\"file[]\">\n";
echo " </td>\n";
echo "</tr>\n";
}
?>
<tr valign="top">
<td width="250" bgcolor="#666666">
<strong><font color="#FFFFFF">weiter zu
Schritt Drei...</font></strong>
</td>
<td bgcolor="#CCCCCC">
<input name="step3" type="submit" id="step3" value="Schritt 3">
</td>
</tr>
</table>
</form>
<?php
}
break;
case 3:
if (isset ($_POST["step3"]))
{
$count = (count ($_FILES["file"]["name"]))-1;
for ($i = 0; $i <= $count; $i++)
{
$a = $i + 1;
if ($_FILES["file"]["error"][$i] == 0)
{
if (move_uploaded_file
(
$_FILES["file"]["tmp_name"][$i],
$upload_dir . "/" . $_FILES["file"]["name"][$i])
)
echo "Die Datei Nr. $a wurde erfogreich hochgeladen!
\n";
else
echo "Fehler beim Hochladen der Datei Nr. " . $a . "!
\n";
}
else
echo "Datei Nr. $a Fehler: keine Datei ausgewählt\n
";
}
}
break;
}
?> |
Diese Nachricht wurde geändert von: languitar |
|  Profil
Editieren
Zitieren
|
HoRnominatoR
Mausakrobat
Beiträge: 165
|
ganz oben, hinter <?php
---
get OPERA for free
|
|  Profil
E-Mail
Website
Editieren
Zitieren
|
heyo
Pixelschubser
Beiträge: 6
|
danke HoRnominatoR,
leider hat es nicht gefunzt ;(
Parse error: parse error, unexpected T_STRING in /home/www/web235/html/home/index.php on line 6
war das erste was ich versucht hatte, zur sicherheit hab ich es nochmals probiert,
leider wieder nicht geklappt.
Diese Nachricht wurde geändert von: heyo |
|  Profil
Editieren
Zitieren
|
subjective
Forenheld
Beiträge: 848
|
In dem Schnipsel fehlt ein ". Du solltest schon gültiges PHP programmieren.
---
Weaverslave
|
|  Profil
Website
Editieren
Zitieren
|
heyo
Pixelschubser
Beiträge: 6
|
meinst du oben bei Location??
es klappt auch so "Location" nicht.
Diese Nachricht wurde geändert von: heyo |
|  Profil
Editieren
Zitieren
|
Ehemaliges Mitglied (#644)
Forenheld
Beiträge: 835
|
header ("Location: ".$url);
Diese Nachricht wurde geändert von: paul |
|  Profil
Editieren
Zitieren
|
languitar
Foren-Team
Beiträge: 2795
|
das wird ja immer gruseliger:
header('location: '.$url);
---
Take a look here!
Lichtblick - Einblick - Ausblick
|
|  Profil
E-Mail
Website
Editieren
Zitieren
|
heyo
Pixelschubser
Beiträge: 6
|
Danke @ paul und languitar,
leider funzt beides nicht ;-(
Parse error: parse error, unexpected T_STRING in /home/www/web235/html/home/index.php on line 119
;O(
|
|  Profil
Editieren
Zitieren
|
Ehemaliges Mitglied (#644)
Forenheld
Beiträge: 835
|
dann zeig uns deinen ganzen code und am besten auch line 119 ;)
|
|  Profil
Editieren
Zitieren
|
heyo
Pixelschubser
Beiträge: 6
|
Kennt jemand ein prog mit dem ich das script testen kann??
Wie finde ich am besten die line 119??
Kann mir jemand Irgendwelche tools vorschlagen?
Im Editor macht da keinen Spass ;(
Danke schön.
|
|  Profil
Editieren
Zitieren
|
languitar
Foren-Team
Beiträge: 2795
|
Hä???? Das ist einfach Zeile 119 der PHP-Datei. Eifnach im Editor öffnen und die Zeilenanzeige anschalten. Kann sogar das Windows Notepad.
Sonst poste doch eifnach mal deinen Code hier.
---
Take a look here!
Lichtblick - Einblick - Ausblick
|
|  Profil
E-Mail
Website
Editieren
Zitieren
|
heyo
Pixelschubser
Beiträge: 6
|
Achtung: Jetzt ist es line 104
ganzer code:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102: | <?php
header('location: '.$url);
$url = "http://www.formel1.de";
$upload_dir = "pics";
if (isset ($_GET["step"]))
$step = $_GET["step"];
else
$step = 1;
switch ($step)
{
case 1:
?>
<form name="form1" method="post" action="<?php echo $_SERVER["PHP_SELF"] ?>?step=2">
<table width="100%" border="0" cellspacing="2" cellpadding="0">
<tr valign="top">
<td width="250" bgcolor="#666666"> <strong><font color="#FFFFFF">Wieviele
Bilder wollen Sie uploaden?</font></strong></td>
<td bgcolor="#CCCCCC">
<input name="ii" type="text" id="ii" size="8">
<font color="#FF0000" size="2">Beliebige
Zahl eingeben...</font>
</td>
</tr>
<tr valign="top">
<td width="250" bgcolor="#666666">
<strong><font color="#FFFFFF">weiter zu
Schritt Zwei...</font></strong>
</td>
<td bgcolor="#CCCCCC">
<input name="step2" type="submit" id="step2" value="Schritt 2">
</td>
</tr>
</table>
</form>
<?php
break;
case 2:
if (isset ($_POST["step2"]))
{
$ii = $_POST["ii"];
?>
<form action="<?php echo $_SERVER["PHP_SELF"] ?>?step=3"
method="post" enctype="multipart/form-data" name="form1">
<table width="100%" border="0" cellspacing="2" cellpadding="0">
<tr valign="top">
<td width="250" bgcolor="#666666">
<strong><font color="#FFFFFF">Bitte fügen
Sie die Dateien ein!</font></strong>
</td>
<td bgcolor="#CCCCCC"> </td>
</tr>
<?php
for ($i=1; $i <= $ii; $i++)
{
echo "<tr valign=\"top\">\n";
echo " <td width=\"250\" bgcolor=\"#666666\">\n";
echo " <strong><font color=\"#FFFFFF\">Datei Nr. $i</font></strong>\n";
echo " </td>\n";
echo " <td bgcolor=\"#CCCCCC\">\n";
echo " <input name=\"file[]\" type=\"file\" id=\"file[]\">\n";
echo " </td>\n";
echo "</tr>\n";
}
?>
<tr valign="top">
<td width="250" bgcolor="#666666">
<strong><font color="#FFFFFF">weiter zu
Schritt Drei...</font></strong>
</td>
<td bgcolor="#CCCCCC">
<input name="step3" type="submit" id="step3" value="Schritt 3">
</td>
</tr>
</table>
</form>
<?php
}
break;
case 3:
if (isset ($_POST["step3"]))
{
$count = (count ($_FILES["file"]["name"]))-1;
for ($i = 0; $i <= $count; $i++)
{
$a = $i + 1;
if ($_FILES["file"]["error"][$i] == 0)
{
if (move_uploaded_file
(
$_FILES["file"]["tmp_name"][$i],
$upload_dir . "/" . $_FILES["file"]["name"][$i])
)
echo "Die Datei Nr. $a wurde erfogreich hochgeladen!\n";
else
echo "Fehler beim Hochladen der Datei Nr. " . $a . "\n";
}
else
echo "Datei Nr. $a Fehler: keine Datei ausgewählt\n";
}
}
break;
?> |
Fehlermeldung:
1: | Parse error: parse error, unexpected $ in /home/www/web235/html/home/index.php on line 104 |
So, jetzt ist aber gar keine line 104 da,
was soll das jetzt heissen?
Diese Nachricht wurde geändert von: heyo |
|  Profil
Editieren
Zitieren
|