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
 
Start new topic
Odpowiedzi
Legro
post
Post #2





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

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


To nie to, bo wczesniej mam:

  1. <?php
  2. $this->template = $templates;
  3. ?>


Ale dzieki

to wie ktos?

To jak to sie da zalatwic czy nie ? ;/
Go to the top of the page
+Quote Post

Posty w temacie


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: 7.10.2025 - 03:59