Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP]Łatwy IF
Kredka29
post
Post #1





Grupa: Zarejestrowani
Postów: 78
Pomógł: 1
Dołączył: 6.12.2008
Skąd: Polska

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


config.php
  1. <?php
  2. //Konfiguracja
  3. $stan="off";
  4. [...]
  5. ?>

index.php
  1. <?php
  2. include "config.php";
  3.  
  4. if ($stan="on")
  5. {
  6. include "online.html";
  7. }
  8. else
  9. {
  10.  if ($stan="off")
  11.  {
  12.  include "offline.html";
  13.  }
  14. }
  15. ?>

Co tu jest źle? Bo niezależnie co ustawię w config'u, to i tak includuje się online.html... (IMG:http://forum.php.pl/style_emoticons/default/wstydnis.gif)
Go to the top of the page
+Quote Post

Posty w temacie
- Kredka29   [PHP]Łatwy IF   11.04.2009, 19:27:14
- - Spawnm   nie $stan="on" tylko $stan==...   11.04.2009, 19:28:42
- - Kredka29   Dzięki   11.04.2009, 20:05:50


Reply to this 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 - 02:03