Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> Nie wyswietla ostatnich tematow, na localhoscie działa a tu zonk :/
Balas
post
Post #1





Grupa: Zarejestrowani
Postów: 347
Pomógł: 0
Dołączył: 27.08.2005
Skąd: Inowrocław

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


Mam skrypt ktory wyswietla ostatnie tematyt z forum. Wszystko na localhoscie działa a na serwerze juz nie sad.gif czemu questionmark.gif

O to fragmenty kodu chyba najbardziej interesujace:
index.php:
  1. <table width="130" border="0" cellpadding="0" cellspacing="0" class="last_topic">
  2.                                          <tr height="20"><th background="images/bar.jpg" align="center" valign="center">Na Forum</th></tr>
  3.                                          <script language="JavaScript" type="text/javascript" src="forum/last.php"></script>
  4.  
  5.                                    </table>

last.php:
  1. <?php
  2.  
  3.  
  4. (...)
  5. $link = "document.writeln('<tr height="16"><td class="link" onmouseover="this.className='link_hover';" onmouseout="this.className='link';" align="center"><a target="" . htmlspecialchars($frame) . "" href="" . $base_url . "viewtopic.". $phpEx . "?" . POST_TOPIC_URL . "=" . urlencode($row['topic_id']) . "" title="" .htmlspecialchars($caly_title). "">" . htmlspecialchars($row['topic_title']) . "</a></td></tr>')";
  6. echo (!$javascript ? $link . "n" : addslashes($link));
  7. (...)
  8. ?>


Wynikiem tego jest:
na localhoscie
  1. document.writeln('<tr height="16"><td class="link" onmouseover="this.className='link_hover';" onmouseout="this.className='link';" align="center"><a target="_blank" href="http://localhost/metaldream/forum/viewtopic.php?t=8" title="Skrócona instrukcja obsługi portalu">Skrócona...</a></td></tr>')
  2. document.writeln('<tr height="16"><td class="link" onmouseover="this.className='link_hover';" onmouseout="this.className='link';" align="center"><a target="_blank" href="http://localhost/metaldream/forum/viewtopic.php?t=7" title="test drugiego newsa">test drugiego...</a></td></tr>')
  3. document.writeln('<tr height="16"><td class="link" onmouseover="this.className='link_hover';" onmouseout="this.className='link';" align="center"><a target="_blank" href="http://localhost/metaldream/forum/viewtopic.php?t=6" title="Test trzeciego newsa">Test trzeciego...</a></td></tr>')
  4. document.writeln('<tr height="16"><td class="link" onmouseover="this.className='link_hover';" onmouseout="this.className='link';" align="center"><a target="_blank" href="http://localhost/metaldream/forum/viewtopic.php?t=5" title="Sonda1">Sonda1</a></td></tr>')
  5. document.writeln('<tr height="16"><td class="link" onmouseover="this.className='link_hover';" onmouseout="this.className='link';" align="center"><a target="_blank" href="http://localhost/metaldream/forum/viewtopic.php?t=4" title="Instrukcja obsługi forum. Koniecznie przeczytaj !">Instrukcja...</a></td></tr>')
  6. document.writeln('<tr height="16"><td class="link" onmouseover="this.className='link_hover';" onmouseout="this.className='link';" align="center"><a target="_blank" href="http://localhost/metaldream/forum/viewtopic.php?t=2" title="Testowy temat w SubForum">Testowy temat...</a></td></tr>')


a na serwerze:
  1. document.writeln('<tr height="16"><td class="link" onmouseover="this.className='link_hover';" onmouseout="this.className='link';" align="center"><a target="_blank" href="http://metaldream.ovh.org/forum/viewtopic.php?t=68" title="słaby wokal?">słaby wokal?</a></td></tr>')
  2. document.writeln('<tr height="16"><td class="link" onmouseover="this.className='link_hover';" onmouseout="this.className='link';" align="center"><a target="_blank" href="http://metaldream.ovh.org/forum/viewtopic.php?t=30" title="Uwagi do forum">Uwagi do forum</a></td></tr>')
  3. document.writeln('<tr height="16"><td class="link" onmouseover="this.className='link_hover';" onmouseout="this.className='link';" align="center"><a target="_blank" href="http://metaldream.ovh.org/forum/viewtopic.php?t=64" title="Ride the Lightening">Ride the...</a></td></tr>')
  4. document.writeln('<tr height="16"><td class="link" onmouseover="this.className='link_hover';" onmouseout="this.className='link';" align="center"><a target="_blank" href="http://metaldream.ovh.org/forum/viewtopic.php?t=67" title="Portal">Portal</a></td></tr>')
  5. document.writeln('<tr height="16"><td class="link" onmouseover="this.className='link_hover';" onmouseout="this.className='link';" align="center"><a target="_blank" href="http://metaldream.ovh.org/forum/viewtopic.php?t=66" title="citriniti">citriniti</a></td></tr>')
  6. document.writeln('<tr height="16"><td class="link" onmouseover="this.className='link_hover';" onmouseout="this.className='link';" align="center"><a target="_blank" href="http://metaldream.ovh.org/forum/viewtopic.php?t=65" title="Hosting :)">Hosting :)</a></td></tr>')
  7. document.writeln('<tr height="16"><td class="link" onmouseover="this.className='link_hover';" onmouseout="this.className='link';" align="center"><a target="_blank" href="http://metaldream.ovh.org/forum/viewtopic.php?t=62" title="Teksty James'a">Teksty James'a</a></td></tr>')
  8. document.writeln('<tr height="16"><td class="link" onmouseover="this.className='link_hover';" onmouseout="this.className='link';" align="center"><a target="_blank" href="http://metaldream.ovh.org/forum/viewtopic.php?t=59" title="Przydatne linki biggrin.gif">Przydatne...</a></td></tr>')
  9. document.writeln('<tr height="16"><td class="link" onmouseover="this.className='link_hover';" onmouseout="this.className='link';" align="center"><a target="_blank" href="http://metaldream.ovh.org/forum/viewtopic.php?t=14" title="Avatar">Avatar</a></td></tr>')
  10. document.writeln('<tr height="16"><td class="link" onmouseover="this.className='link_hover';" onmouseout="this.className='link';" align="center"><a target="_blank" href="http://metaldream.ovh.org/forum/viewtopic.php?t=63" title="Bruce Dickinson">Bruce Dickinson</a></td></tr>')


Czyli mniej wiecej to samo. Tyle ze na localhoscie działa a na serwerze juz nie sad.gif Sprawdzalem sciezke i sie zgadza

Ten post edytował OnE.Killer 6.11.2005, 16:16:10


--------------------
Go to the top of the page
+Quote Post
ActivePlayer
post
Post #2





Grupa: Przyjaciele php.pl
Postów: 1 224
Pomógł: 40
Dołączył: 6.07.2004
Skąd: Wuppertal

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


Prosze o poprawnienie nazwy tematu.
Go to the top of the page
+Quote Post
Balas
post
Post #3





Grupa: Zarejestrowani
Postów: 347
Pomógł: 0
Dołączył: 27.08.2005
Skąd: Inowrocław

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


Chyba wiem czemu tak sie dzialo...
Cytat
Teksty James'a
ten apostrof wszystko niszczyl... musze zrobic jeszcze wycinanie apostrofow smile.gif


--------------------
Go to the top of the page
+Quote Post
ActivePlayer
post
Post #4





Grupa: Przyjaciele php.pl
Postów: 1 224
Pomógł: 40
Dołączył: 6.07.2004
Skąd: Wuppertal

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


rozwiązaniem Twojego problemu jest addslashes" title="Zobacz w manualu php" target="_manual
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 21.08.2025 - 20:18