Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [PHP]Wolna linia, wolna, linia, pomoc
Hackett
post
Post #1





Grupa: Zarejestrowani
Postów: 13
Pomógł: 0
Dołączył: 21.10.2012

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


Mam taki kodzik (IMG:style_emoticons/default/smile.gif)
  1. <?php
  2. $includeDir = ".".DIRECTORY_SEPARATOR."pages".DIRECTORY_SEPARATOR;
  3. $includeDefault = $includeDir."home.php";
  4. if(isset($_GET['s']) && !empty($_GET['s']))
  5. {
  6. $_GET['s'] = str_replace("\0", '', $_GET['s']);
  7. $includeFile = basename(realpath($includeDir.$_GET['s'].".php"));
  8. $includePath = $includeDir.$includeFile;
  9. if(!empty($includeFile) && file_exists($includePath))
  10. {
  11. include($includePath);
  12. }
  13. else
  14. {
  15. include($includeDefault);
  16. }
  17. }
  18. else
  19. {
  20. include($includeDefault);
  21. }
  22. ?>

I tworzy on wolną linię na stronie...
Da się wykluczyć to tworzenie wolnej linii?
Go to the top of the page
+Quote Post
Wazniak96
post
Post #2





Grupa: Zarejestrowani
Postów: 550
Pomógł: 75
Dołączył: 5.06.2012
Skąd: Lębork

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


W tym pliku nie ma zadnego wyswietlana tekstu to dlaczego miałoby dodawać pustą linię? Masz tutaj includowane pliki. Być może w nich jest przyczyna.
Go to the top of the page
+Quote Post
Hackett
post
Post #3





Grupa: Zarejestrowani
Postów: 13
Pomógł: 0
Dołączył: 21.10.2012

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


Patrz na stronę: sect.glombek.pl

Pomiędzy slaiderem a następnyą ramką jest wolna linia.
Kod odpowiedzialny za wyświetlanie:
  1. <div id="content">
  2. <div id="con-top"></div>
  3. <div id="con-mid">
  4. <span id="prevBtn"><a href="java script:void(0);"></a></span>
  5. <span id="nextBtn"><a href="java script:void(0);"></a></span>
  6. <div id="slider">
  7. <ul>
  8. <li><img src="img/slide_1.png"></li>
  9. <li><img src="img/slide_1.png"></li>
  10. <li><img src="img/slide_1.png"></li>
  11. <li><img src="img/slide_1.png"></li>
  12. </ul>
  13. </div>
  14. </div>
  15. <div id="con-bot"></div>
  16. <?php
  17. $includeDir = ".".DIRECTORY_SEPARATOR."pages".DIRECTORY_SEPARATOR;
  18. $includeDefault = $includeDir."home.php";
  19. if(isset($_GET['s']) && !empty($_GET['s']))
  20. {
  21. $_GET['s'] = str_replace("\0", '', $_GET['s']);
  22. $includeFile = basename(realpath($includeDir.$_GET['s'].".php"));
  23. $includePath = $includeDir.$includeFile;
  24. if(!empty($includeFile) && file_exists($includePath))
  25. {
  26. include($includePath);
  27. }
  28. else
  29. {
  30. include($includeDefault);
  31. }
  32. }
  33. else
  34. {
  35. include($includeDefault);
  36. }
  37. ?>
  38. </div>
Go to the top of the page
+Quote Post
Wazniak96
post
Post #4





Grupa: Zarejestrowani
Postów: 550
Pomógł: 75
Dołączył: 5.06.2012
Skąd: Lębork

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


  1. <div id="con-bot"></div>

Czyż by to ta linijka? (IMG:style_emoticons/default/smile.gif)
Go to the top of the page
+Quote Post
Hackett
post
Post #5





Grupa: Zarejestrowani
Postów: 13
Pomógł: 0
Dołączył: 21.10.2012

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


Nie to jest zakończenie okienka. Wejdz i sprawdz sobie w kodzie że jest wolna linia. W HTML nic nie widać więc to musi coś z tego php być.
Go to the top of the page
+Quote Post
memory
post
Post #6





Grupa: Zarejestrowani
Postów: 616
Pomógł: 84
Dołączył: 29.11.2006
Skąd: bełchatów

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


Strony (home,register itd ) masz zapewne zakodowane w utf-8 z bom. Trzeba użyć bez bom
Go to the top of the page
+Quote Post
Hackett
post
Post #7





Grupa: Zarejestrowani
Postów: 13
Pomógł: 0
Dołączył: 21.10.2012

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


Pomogło, ale mogę prosić o wyjaśnienie o co chodzi z tym BOM?
Go to the top of the page
+Quote Post
fate
post
Post #8





Grupa: Zarejestrowani
Postów: 824
Pomógł: 106
Dołączył: 14.03.2012
Skąd: Warszawa

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


Proszę:

http://pl.wikipedia.org/wiki/BOM_%28informatyka%29
Go to the top of the page
+Quote Post

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: 3.10.2025 - 04:11