Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Closed TopicStart new topic
> [PHP]wczytwyanie danych z pliku csv
lexter
post
Post #1





Grupa: Zarejestrowani
Postów: 9
Pomógł: 0
Dołączył: 7.04.2009

Ostrzeżenie: (0%)
-----


Mam taki mały problem, wczytuje dane z pliku "csv" i wywala mi taki błąd - Parse error: syntax error, unexpected T_STRING in F:\xampp\htdocs\test.php on line 22

Co można z tym zrobić żeby działało?


Kod
<?
$file  = fopen("waluty.csv", "r") or exit("Nie mogę otworzyć pliku!");

while(!feof($file))
    {
    echo fgets($file). "<br>";
    }
fclose($file);

function makePage($waluty)
{
htmlBegin();
tableHead();
$rozmTab = count("waluty.csv");

    tableEnd();
    htmlEnd();
}
function htmlBegin(){
echo "<html><head></head><body>";
}
functon htmlEnd(){   // to jest linia 22
echo "</body></html>";
}
functon tableHead(){
echo "<table cellspacing=\"1\" cellpadding=\"1" border =\"1\">";

}
function tableEnd ()
{
echo "</table>";
}
function rowTwoCol ($col1, $col2);
{
echo "<tr><td>".$col1. "</td><td>". $col2."</td></tr>";}

makePage($waluty);

?>
Go to the top of the page
+Quote Post
Pawel_W
post
Post #2





Grupa: Zarejestrowani
Postów: 1 675
Pomógł: 286
Dołączył: 15.06.2009
Skąd: Wieliczka

Ostrzeżenie: (0%)
-----


tak? a według mnie linia 22 to ta:
  1. echo "<table cellspacing=\"1\" cellpadding=\"1" border =\"1\">";

i brakuje w niej \ przed border (IMG:style_emoticons/default/smile.gif)
Go to the top of the page
+Quote Post
Spawnm
post
Post #3





Grupa: Moderatorzy
Postów: 4 069
Pomógł: 497
Dołączył: 11.05.2007
Skąd: Warszawa




Forum nie parser, zamykam.
Go to the top of the page
+Quote Post

Closed TopicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 23.08.2025 - 18:19