Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [JavaScript][PHP]kod php w .js
lukko
post 15.12.2009, 12:43:57
Post #1





Grupa: Zarejestrowani
Postów: 49
Pomógł: 0
Dołączył: 12.03.2009

Ostrzeżenie: (10%)
X----


Helou,

Pewien skrypt .js przerabiam sobie:

Kod
function test(trialArray){
      var htmlString = '';
  htmlString += '<div>test_test';
  htmlString += '</div>';
  return htmlString;
  }


Chce koniecznie do pliku .js zaciągnąć coś z php:

Kod
function test(trialArray){
      var htmlString = '';
  htmlString += '<div>test_test <?php "_test"; ?>';
  htmlString += '</div>';
  return htmlString;
  }


No ale <?php "_test"; ?> nie pójdzie omija to...


Pytanie czy w ogóle do pliku javascript da się zagnieździć php albo jakaś alternatywa ?

Ten post edytował lukko 15.12.2009, 12:45:06
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 Wersja Lo-Fi Aktualny czas: 14.08.2025 - 13:40