Newbie Frage ( Php )
Dragonskin 18.05.2002 - 12:41 1083 19
Dragonskin
Banned
|
bekomm immer Meldung -> Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/www/web1/html/Grisu/Admin/php/login.php on line 20 Parse error: parse error in /home/www/web1/html/Grisu/Admin/php/login.php on line 21 Mein script --> <? if ($pwd == lol) { echo " <html> <head> <title>:: Admin bereich ::</title> </head> <body bgcolor=\"#D8D8D8\" text=\"black\"> <table border=\"1\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse: collapse; text-align:center\" bordercolor=\"#111111\" width=\"47%\" height=\"127\" align=\"center\"> <tr> <td bgcolor=\"#B4B4B4\" width=\"100%\" height=\"19\"> <p style=\"text-align: left\"><b>:: Admin Bereich für <font color=\"red\"> $User </font> ::</b></td> </tr> <tr> <td width=\"100%\" height=\"87\"> <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse: collapse\" bordercolor=\"#111111\" width=\"100%\" height=\"65\"> <tr> <BR> <form action=\"news.php\" method=\"post"\> <td width=\"29%\" height=\"19\">News schreiben</td> <td width=\"71%\" height=\"19\"> <p><input type=\"Submit\" name=\"lingrtf\"></form></td> </tr> <tr> <td width=\"29%\" height=\"19\">Password:</td> <td width=\"71%\" height=\"19\"> <FORM ACTION=\"http://www.cwsurf.de/Grisu/Admin/php/login.php\" METHOD=\"POST\"> <INPUT TYPE=\"password\" NAME=\"pwd\"></td> </tr> <tr> <td width=\"29%\" height=\"19\"> <p align=\"center\"> <br> <input type=\"submit\" value=\"Login\" name=\"B1\"></CENTER></form></td> <td width=\"71%\" height=\"19\"> </td> </tr> </table> </td> </tr> <tr> <td bgcolor=\"#B4B4B4\" width=\"100%\" height=\"19\"> <p align=\"right\"><b><font size=\"2\" color=\"#FFFFFF\">© by [ETP]Grisu</font></b></td> </tr> </table> </center> </div> "; } else { echo "Falsches pwd !!!!!!!!!!"; } ?>
|
noledge
CWNE #540
|
<?
if ($pwd == lol)
{
echo <<<test
<html>
<head>
<title>:: Admin bereich ::</title>
</head>
<body bgcolor=\"#D8D8D8\" text=\"black\">
<table border=\"1\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse: collapse; text-align:center\" bordercolor=\"#111111\" width=\"47%\" height=\"127\" align=\"center\">
<tr>
<td bgcolor=\"#B4B4B4\" width=\"100%\" height=\"19\">
<p style=\"text-align: left\"><b>:: Admin Bereich für <font color=\"red\"> $User </font> ::</b></td>
</tr>
<tr>
<td width=\"100%\" height=\"87\">
<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse: collapse\" bordercolor=\"#111111\" width=\"100%\" height=\"65\">
<tr>";
<BR>
<form action=\"news.php\" method=\"post"\>
<td width=\"29%\" height=\"19\">News schreiben</td>
<td width=\"71%\" height=\"19\">
<p><input type=\"Submit\" name=\"lingrtf\"></form></td>
</tr>
<tr>
<td width=\"29%\" height=\"19\">Password:</td>
<td width=\"71%\" height=\"19\">
<FORM ACTION=\"http://www.cwsurf.de/Grisu/Admin/php/login.php\" METHOD=\"POST\">
<INPUT TYPE=\"password\" NAME=\"pwd\"></td>
</tr>
<tr>
<td width=\"29%\" height=\"19\">
<p align=\"center\">
<br>
<input type=\"submit\" value=\"Login\" name=\"B1\"></CENTER></form></td>
<td width=\"71%\" height=\"19\">
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td bgcolor=\"#B4B4B4\" width=\"100%\" height=\"19\">
<p align=\"right\"><b><font size=\"2\" color=\"#FFFFFF\">© by [ETP]Grisu</font></b></td>
</tr>
</table>
</center>
</div>
test;
} else {
echo "Falsches pwd !!!!!!!!!!";
|
Dragonskin
Banned
|
was war falsch?
|
noledge
CWNE #540
|
des echo über mehrere zeilen mag er offenbar ned
ein
echo <<<whatever
und am ende
whatever;
korrigiert das, die backslashes vor den " kannst da dann auch sparen
|
Dragonskin
Banned
|
so ejtzt kommt--> Parse error: parse error in /home/www/web1/html/Grisu/Admin/php/login.php on line 53
|
noledge
CWNE #540
|
hast hinten das
<<< wieder abgeschlossen? also
<<<test
test;
?
|
Dragonskin
Banned
|
so wie du mkir es reinkopiert hastz so habe ich es in meinen login getan
|
noledge
CWNE #540
|
äh.. uups } ?> hinten dran
|
watchout
Legendundead
|
(will hier nur deponieren, dass es bei mir mit mehrzeiligen strings perfekt funktioniert... )
Edit: Falsch ausgedrückt: Bei mir funktionieren mehrzeilige Strings perfekt/ohne Probleme....
Bearbeitet von watchout am 19.05.2002, 13:48
|
funka
Legend ex-prophet(down below)
|
jo aber echo <<< EOT is halt fuer sowas gedacht...
|
watchout
Legendundead
|
jo aber echo <<< EOT is halt fuer sowas gedacht... 'ma egal - funktioniert, wie's geht...
|
Guest
Deleted User
|
da ist ein ?> langerhtmltext <? gscheiter
|
jives
And the science gets done
|
Right Und wennst vars ausgeben musst, maschst das mit vielhtml <?php echo $blah; ?> vielhtml
|
Guest
Deleted User
|
<?= $var ?>
|
Guest
Deleted User
|
<?= $var ?>
genau. trotzdem kostet jeder context switch wieder zeit. drum: intelligent switchen spart zeit
|