Nieznany blad
: pn paź 27, 2003 7:21 pm
W wyniku dzialania takiego oto skryptu:
[php]<?php
$dodaj = fopen ("wiadomosci_1_data.php", "a");
fwrite ($dodaj, "<!-- POCZĄTEK WIADOMOSCI //-->\n<tr><td width=616 height=26><p align=center>".$_POST['nazwa']."</p></td>
<td width=1192 height=26><p align=center>".$_POST['opis']."\n</p></td><td width=1192 height=26><p align=center>"
.date("j/m/Y")."\n</p></td><td width=1192 height=26><p align=center>\n");
$tresc = fopen ("wiadomosci/zestaw1/".$_POST['nazwa'].".php", "a");
fwrite ($tresc "<html>\n
<head>\n
<title>to jest tytul</title>\n
<link rel=\"stylesheet\" type=\"text/css\" href=\"style.css\">\n
</head>\n
<body>\n
<div align=\"center\">\n
<center>\n
<table border=\"0\" width=\"100%\" height=\"100%\" cellspacing=\"5\" cellpadding=\"2\">\n
<tr>\n
<td width=\"15%\" height=\"100%\" valign=\"top\">\n
\n
<?php\n
\n
require(\"menu_left.php\");\n
\n
?>\n
</td>\n
<td width=\"85%\" valign=\"top\">
\n");
fwrite ($tresc, nl2br ($_POST['tresc2']));
fwrite ($tresc, "<td></tr></table></center></div></body></html>");
fclose ($tresc);
fwrite ($dodaj, "<a href=\"wiadomosci/zestaw1/".$_POST['nazwa'].".php\">Przeczytaj</a>\n</p></td></tr>\n\n
<!-- KONIEC WIADOMOSCI //-->\n\n");
fclose ($dodaj);
echo ("ok");
?>[/php]
otrzymuje taki oto komunikat:
Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in .../wiadomosci_1_script_m2.php on line 26
tyle ze linia 26 to
\n");
dlaczego wiec wyskakuje blad o parse? jaki to typ bledu? gdzie moge znalesc jakis konkretny spis bledow?
jesli potrzeba to moge wyslac kody zrodlowe polaczonych plikow z tym plikiem (np. formularz jesli jest to konieczne)
[php]<?php
$dodaj = fopen ("wiadomosci_1_data.php", "a");
fwrite ($dodaj, "<!-- POCZĄTEK WIADOMOSCI //-->\n<tr><td width=616 height=26><p align=center>".$_POST['nazwa']."</p></td>
<td width=1192 height=26><p align=center>".$_POST['opis']."\n</p></td><td width=1192 height=26><p align=center>"
.date("j/m/Y")."\n</p></td><td width=1192 height=26><p align=center>\n");
$tresc = fopen ("wiadomosci/zestaw1/".$_POST['nazwa'].".php", "a");
fwrite ($tresc "<html>\n
<head>\n
<title>to jest tytul</title>\n
<link rel=\"stylesheet\" type=\"text/css\" href=\"style.css\">\n
</head>\n
<body>\n
<div align=\"center\">\n
<center>\n
<table border=\"0\" width=\"100%\" height=\"100%\" cellspacing=\"5\" cellpadding=\"2\">\n
<tr>\n
<td width=\"15%\" height=\"100%\" valign=\"top\">\n
\n
<?php\n
\n
require(\"menu_left.php\");\n
\n
?>\n
</td>\n
<td width=\"85%\" valign=\"top\">
\n");
fwrite ($tresc, nl2br ($_POST['tresc2']));
fwrite ($tresc, "<td></tr></table></center></div></body></html>");
fclose ($tresc);
fwrite ($dodaj, "<a href=\"wiadomosci/zestaw1/".$_POST['nazwa'].".php\">Przeczytaj</a>\n</p></td></tr>\n\n
<!-- KONIEC WIADOMOSCI //-->\n\n");
fclose ($dodaj);
echo ("ok");
?>[/php]
otrzymuje taki oto komunikat:
Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in .../wiadomosci_1_script_m2.php on line 26
tyle ze linia 26 to
\n");
dlaczego wiec wyskakuje blad o parse? jaki to typ bledu? gdzie moge znalesc jakis konkretny spis bledow?
jesli potrzeba to moge wyslac kody zrodlowe polaczonych plikow z tym plikiem (np. formularz jesli jest to konieczne)