Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Closed TopicStart new topic
> [HTML][PHP] Parse error
Eleeist
post 28.11.2010, 19:31:53
Post #1





Grupa: Zarejestrowani
Postów: 48
Pomógł: 0
Dołączył: 25.03.2009

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


  1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <html>
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  5. <title>Strona</title>
  6. </head>
  7. <body>
  8. <?php
  9. if (!isset($_POST['submit'])) {
  10. ?>
  11. <div id="page">
  12. <center>
  13. <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="POST">
  14. Haslo: <input type="password" name="password" />
  15. <input type="submit" name="submit" value="Wyslij" />
  16. </form>
  17. </center>
  18. </div>
  19. </body>
  20. </html>


Wywala:

Kod
Parse error: syntax error, unexpected $end in /index.php on line 25


I nie mam pojęcia czemu sad.gif. Przecież </html> tam może sobie siedzieć...

Ten post edytował Eleeist 28.11.2010, 19:32:46
Go to the top of the page
+Quote Post
Mephistofeles
post 28.11.2010, 20:21:18
Post #2





Grupa: Zarejestrowani
Postów: 1 182
Pomógł: 115
Dołączył: 4.03.2009
Skąd: Myszków

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


A gdzie masz tą 25 linijkę?

Z tego co widzę nie zamykasz ifa, poza tym źle to robisz. Przy zamykaniu bloku PHP stosuje się taką konstrukcję:
  1. <?php if (true): ?>
  2. true
  3. <?php endif; ?>


Ten post edytował Mephistofeles 28.11.2010, 20:22:38
Go to the top of the page
+Quote Post
ADeM
post 28.11.2010, 20:44:01
Post #3





Grupa: Zarejestrowani
Postów: 455
Pomógł: 69
Dołączył: 23.10.2004
Skąd: Oświęcim

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


Może być i taka składnia jaką zastosował Eleeist, jednak brakuje mu zamknięcia "}".


--------------------
Go to the top of the page
+Quote Post
Mephistofeles
post 28.11.2010, 20:47:20
Post #4





Grupa: Zarejestrowani
Postów: 1 182
Pomógł: 115
Dołączył: 4.03.2009
Skąd: Myszków

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


Wiem, że może, ale po coś wprowadzono dodatkową składnię winksmiley.jpg.
Go to the top of the page
+Quote Post
Fifi209
post 28.11.2010, 21:21:31
Post #5





Grupa: Zarejestrowani
Postów: 4 655
Pomógł: 556
Dołączył: 17.03.2009
Skąd: Katowice

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


Po pierwsze forum nie parser.

@up
Zależy jak kto woli ;]


--------------------
Zainteresowania: C#, PHP, JS, SQL, AJAX, XML, C dla AVR
Chętnie pomogę, lecz zanim napiszesz: Wujek Google , Manual PHP
Go to the top of the page
+Quote Post
Cysiaczek
post 28.11.2010, 21:51:58
Post #6





Grupa: Moderatorzy
Postów: 4 465
Pomógł: 137
Dołączył: 26.03.2004
Skąd: Gorzów Wlkp.




nie nie nie, żadnych błędów składni na forum. Zaopatrz się w dobry edytor kolorujący składnię i będziesz widział jak na dłoni. Zajrzyj do wątku Najlepszy edytor dla programisty

Zamykam


--------------------
To think for yourself you must question authority and
learn how to put yourself in a state of vulnerable, open-mindedness;
chaotic, confused, vulnerability, to inform yourself.
Think for yourself. Question authority.
Go to the top of the page
+Quote Post

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

 



RSS Wersja Lo-Fi Aktualny czas: 24.05.2025 - 01:52