Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Wstawienie kodu w tabelkę
pirex
post
Post #1





Grupa: Zarejestrowani
Postów: 6
Pomógł: 0
Dołączył: 11.05.2005
Skąd: UkF

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


Witam mam pewien problem... Otóż mam taki kod:

Kod
// The "key stats" box.
echo '
<td class="headerdown" align="right" width="40%" style="padding-right: 8px;">
</td>
</tr>
</table>
</td>';


I w tą tabelkę:

Kod
<td class="headerdown" align="right" width="40%" style="padding-right: 8px;"></td>


chcę wstawić ten kod:

Kod
<?php
if (include(getenv('DOCUMENT_ROOT').'banery/phpadsnew.inc.php')) {
if (!isset($phpAds_context)) $phpAds_context = array();
$phpAds_raw = view_raw ('', 12, '', '', '0', $phpAds_context);
echo $phpAds_raw['html'];
}
?>


Zrobiłem to w taki sposób:

Kod
// The "key stats" box.
echo '
<td class="headerdown" align="right" width="40%" style="padding-right: 8px;">
<?php
if (include(getenv(\'DOCUMENT_ROOT\').\'banery/phpadsnew.inc.php\')) {
if (!isset($phpAds_context)) $phpAds_context = array();
$phpAds_raw = view_raw (\'\', 12, \'\', \'\', \'0\', $phpAds_context);
echo $phpAds_raw['html'];
}
?>
</td>
</tr>
</table>
</td>';


Ale niestety mam błąd:

Cytat
Template Parse Error!
There was a problem loading the /Themes/saforange105/index.template.php template or language file. Please check the syntax and try again - remember, single quotes (') often have to be escaped with a slash (\). To see more specific error information from php, try accessing the file directly.

You may want to try to refresh this page or use the default theme.


----edit----
Proszę poprawić posta używając odpowiednich tagów bbCode exclamation.gif!
~mike_mech


--------------------
Pozdrawiam pirex!
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi (1 - 3)
Fipaj
post
Post #2





Grupa: Zarejestrowani
Postów: 691
Pomógł: 0
Dołączył: 19.01.2005
Skąd: Warszawa

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


Zamień wszystkie ' i \' na ", zacznie działać...


--------------------
Go to the top of the page
+Quote Post
pirex
post
Post #3





Grupa: Zarejestrowani
Postów: 6
Pomógł: 0
Dołączył: 11.05.2005
Skąd: UkF

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


Wszystkie to znaczy z całego kodu - począwszy od echo ' - a kończąc na </table>
</td>'; ?


--------------------
Pozdrawiam pirex!
Go to the top of the page
+Quote Post
Pigula
post
Post #4





Grupa: Zarejestrowani
Postów: 446
Pomógł: 0
Dołączył: 5.03.2005
Skąd: Lublin

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


  1. echo '
  2. <td class="headerdown" align="right" width="40%" style="padding-right: 8px;">
  3. <?php
  4. ?>

chba najpierw <?php a potem echo?
pozatym mozna tak:
  1. <td class="headerdown" align="right" width="40%" style="padding-right: 8px;">
  2. <?php
  3. if (include(getenv('DOCUMENT_ROOT').'banery/phpadsnew.inc.php')) {
  4. if (!isset($phpAds_context)) $phpAds_context = array();
  5. $phpAds_raw = view_raw ('', 12, '', '', '0', $phpAds_context);
  6. echo $phpAds_raw['html'];
  7. }
  8. ?>
  9. </td>
  10. </tr>
  11. </td>
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: 20.08.2025 - 12:08