Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Problem z funkcją eval
Legro
post
Post #1





Grupa: Zarejestrowani
Postów: 233
Pomógł: 3
Dołączył: 18.07.2005

Ostrzeżenie: (40%)
XX---


Mam taki kod:

  1. <?php
  2. $templates['game'] = '<div class="game">
  3. <table border="0" width="200" style="border-collapse: collapse">
  4. <tr>
  5. <td rowspan="2"><img src="{$this->imgdir}/{$game['gThumb']}" alt="{$game['gName']} - {$game['gDescription']}" /></td>
  6. <td><strong><a href="{$_SERVER['PHP_SELF']}?act=play&id={$game['gId']}">{$game['gName']}</a></strong></td>
  7. </tr>
  8. <tr>
  9. <td>{$game['gDescription']}</td>
  10. </tr>
  11. </table>
  12. </div>';
  13. ?>


oraz taki:

  1. <?php
  2. eval("$game .= "".$this->template['game']."";");
  3. ?>


I wyskakuje mi taki błąd:

Cytat
Parse error: syntax error, unexpected T_LNUMBER in c:\usr\apache\httpd\html\games\gclacss.php(125) : eval()'d code on line 2


Siedzie juz nad problemem z dobre 2 godziny i nic nie moge wymyslic. Ktos pomoze?

Pozdrawiam.
Go to the top of the page
+Quote Post

Posty w temacie


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: 22.08.2025 - 19:19