Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.

{include_php file = 'php/test.php' id=$id}

[es] :: PHP :: Smarty template engine :: {include_php file = 'php/test.php' id=$id}

[ Pregleda: 3528 | Odgovora: 2 ] > FB > Twit

Postavi temu Odgovori

Autor

Pretraga teme: Traži
Markiranje Štampanje RSS

xxxrugby

Član broj: 16068
Poruke: 653
*.adsl.net.t-com.hr.

Sajt: www.zagreb-rugby.hr


Profil

icon {include_php file = 'php/test.php' id=$id}16.02.2007. u 11:52 - pre 208 meseci
{include_php file = 'php/test.php' id=$id}

I sad da je u test.php
<?php
$id;
echo $id;
?>

Al mi ne posalje u $id vrijednost dok unutar template-a .tpl $id ima uredno vrijednost.

Kako bi mogao poslat tako nesto u php.
xxxrugby: "We are all philosophers, when question is about politics!"
 
Odgovor na temu

xxxrugby

Član broj: 16068
Poruke: 653
*.adsl.net.t-com.hr.

Sajt: www.zagreb-rugby.hr


Profil

icon Re: {include_php file = 'php/test.php' id=$id}16.02.2007. u 12:36 - pre 208 meseci
Rjeseno

<?php
$id = $_GET['id'];
echo $id;
?>
xxxrugby: "We are all philosophers, when question is about politics!"
 
Odgovor na temu

xxxrugby

Član broj: 16068
Poruke: 653
*.adsl.net.t-com.hr.

Sajt: www.zagreb-rugby.hr


Profil

icon Re: {include_php file = 'php/test.php' id=$id}16.02.2007. u 13:25 - pre 208 meseci
al kako sad vratit iz tog php-a gro varijabli nesto kao

$this->assign('test',$var);

Problem je u takvom vračanju sto dobijam poruku kao
Fatal error: Using $this when not in object context in C:\Program Files\xampp\htdocs\testing_php\php_classes\profil_tjedna.php on line 37

E sad kako to prepravit da vraca to objektu. Jel to unutar index.tpl-a se poziva profil_tjedna.tpl koj izvlaci sve iz php-a. Zasebnog nije kao ubacena funkcija unutar smarty-a.

[Ovu poruku je menjao xxxrugby dana 22.02.2007. u 11:49 GMT+1]
xxxrugby: "We are all philosophers, when question is about politics!"
 
Odgovor na temu

[es] :: PHP :: Smarty template engine :: {include_php file = 'php/test.php' id=$id}

[ Pregleda: 3528 | Odgovora: 2 ] > FB > Twit

Postavi temu Odgovori

Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.