Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: Jak rozwiązać ten problem ~ include + print
Forum PHP.pl > Forum > Gotowe rozwiązania
karolski
Witam,

Mam problem z stroną w postacio skryptu i systemem newsów który chce w niej zaincludować problem jest następujący kod strony wygląda tak :

  1. <?php
  2.  
  3. require(&#092;"header.txt\");
  4.  
  5. require(&#092;"menu_gorne01.txt\");
  6.  
  7. include ('imieniny.php');
  8.  
  9. echo &#092;"Imieniny: \".$imieniny[date(\"n\",time())][date(\"j\",time())];
  10.  
  11. require(&#092;"menu_gorne02.txt\");
  12.  
  13. require(&#092;"menu_lewe.txt\");
  14.  
  15. print(&#092;"
  16. <!---------- część środkowa ----------!>
  17. <td valign=top>
  18. <table border=0 width=430 cellpadding=5 cellspacing=0>
  19. <tr>
  20. <td bgcolor=#003366 width=430 height=10 valign=top>
  21. <class=&#092;"header\\" align=center><img src=\"Images/dot.gif\" hspace=8 border=0>Aktualności<img src=\"Images/dot.gif\" hspace=8 border=0></p>
  22. </td>
  23. </tr>
  24. <tr>
  25. <td bgcolor=#000000 width=430 height=1>
  26. </td>
  27. </tr>
  28. <tr>
  29. <td bgcolor=#4778a3 width=430 height=2>
  30. </td>
  31. </tr>
  32. <tr>
  33. <td bgcolor=#ededed width=430 height=10>
  34. </td>
  35. </tr>
  36. <tr>
  37. <td valign=top width=430 bgcolor=#ededed>
  38. <class=&#092;\"main\" align=justify>
  39. &#60;!--------- tu chciałbym wstawić skrypt include (\"news/tresc.php\"); -------!>
  40.  
  41. </td>
  42. </tr>
  43. </table>
  44. </td>
  45.  
  46. &#092;");
  47.  
  48.  
  49.  
  50. require(&#092;"menu_prawe01.txt\");
  51.  
  52. require(&#092;"menu_prawe02.txt\");
  53.  
  54. require(&#092;"menu_prawe03.txt\");
  55.  
  56. ?>


może ktoś bedzie wiedziła jak to obejść by działało dużo kombinowałem lecz bez skutecznie sad.gif
Ive
nie wiem czy dobrze zrozumialem twoj problem ale:
zakończyć po tagu <p ...> "); i dać w nowej linijce include("costam.inc.php"); i w nowej znowu print(" i reszta kodu
karolski
jak tak robie to tabele sie jebią ale to działa nie wiem jak to naprawić
Ive
heh
to daj tak:
  1. <?
  2.  
  3. // ładowanie tych menu etc. blabla
  4.  
  5. require(&#092;"menu_lewe.txt\");
  6. ?>
  7.     <td valign=top>
  8.     <table border=0 width=430 cellpadding=5 cellspacing=0>
  9.     <tr>
  10.     <td bgcolor=#003366 width=430 height=10 valign=top>
  11.     <p class=\"header\" align=center><img src=\"Images/dot.gif\" hspace=8 border=0>Aktualności<img src=\"Images/dot.gif\" hspace=8 border=0></p>
  12.     </td>
  13.     </tr>
  14.     <tr>
  15.     <td bgcolor=#000000 width=430 height=1>
  16.     </td>
  17.     </tr>
  18.     <tr>
  19.     <td bgcolor=#4778a3 width=430 height=2>
  20.     </td>
  21.     </tr>
  22.     <tr>
  23.     <td bgcolor=#ededed width=430 height=10>
  24.     </td>
  25.     </tr>
  26.     <tr>
  27.     <td valign=top width=430 bgcolor=#ededed>
  28.         <p class=\"main\" align=justify>
  29.         <? include (&#092;"news/tresc.php\"); ?>
  30.         </p>
  31.     </td>
  32.     </tr>
  33.     </table>
  34.     </td>
  35. <?
  36.  
  37. require(&#092;"menu_prawe01.txt\");
  38. // blablabla.... etc.
  39.  
  40. ?>


[EDIT]
tylko jak juz korzystasz z mojego sposobu to wywal te wszysteki \ sprzed " ;]
karolski
dalej zimA TABELE SIE JEBIA sad.gif
Ive
heh a czy czasem w tym pliku includowanym nie masz niedomknietej tabelki/komórki tabeli ? bo jak nie to nie widze innego rozwiązania. przelukaj plik tresc.php i pozamykaj kazdą komorke i każdą tabelke
karolski
wszystko sie zgadza moze ktos ma jakas sprawdzona recepture ?
To jest wersja lo-fi głównej zawartości. Aby zobaczyć pełną wersję z większą zawartością, obrazkami i formatowaniem proszę kliknij tutaj.
Invision Power Board © 2001-2024 Invision Power Services, Inc.