Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Smarty , Zmienna $file

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Language: Polish
View previous topic :: View next topic  
Author Message
m2007
Smarty n00b


Joined: 08 Apr 2009
Posts: 2

PostPosted: Wed Apr 08, 2009 9:45 am    Post subject: Smarty , Zmienna $file Reply with quote

Witam , mam maly problemzktorymnie moge sie uporac od 2 dni , a mianowiscie mam index.tpl , index.php ktory to wszystko obluguje linki itd i mam pliki html ktore maja byc wyswietlane po kliknieciu na link , niestety zmienna $file nie zmienia sie po kliknieciu na link zostaje caly czas jako home.html i dzieje sie to tylko na zdalych serverach , jak otwieram stronke u siebie z krasnala to wszystko dziala ladnie wklejam kilka kodow :


Wlasnie zauwazylem ze w teamplates_c pliki sie nie pojawiaja , a powinny ustawilem prawa na 777 ale dalej nic



index.php
Quote:

<?
if ($endsession=="logout")
session_destroy();
else
?>



<?


require('Smarty/Smarty.class.php');
$smarty = new Smarty();

$smarty->template_dir = 'desings';
$smarty->compile_dir = 'desings/templates_c';
$smarty->cache_dir = 'desings/cache';
$smarty->config_dir = 'desings/config';
if ($show==home) {
$smarty->assign('file','../html/home.html');
}
else

if ($show==search && $action==result) {
include('./search.php');
$smarty->assign('file','../html/result.php');
}

else
if ($show=="search"){
$smarty->assign('file','../html/search.html');
}
else



if ($show==registre && $action==done) {
include('./registre.php');
$smarty->assign('file','html/registred.html');
}
else

if ($show==registre && $action==null) {
$smarty->assign('file','../html/registre.html');
}
else

if ($show==contactus) {
$smarty->assign('file','../html/contactus.html');
}
else

if ($show==login) {
$smarty->assign('file','../html/login.html');

}
else
if ($show==logout) {
$smarty->assign('file','../html/logout.html');

}
else


if ($show=="")
{
$smarty->assign('file','../html/home.html');
}

$smarty->display('index.tpl');


?>


kawalek index.tpl
Quote:



</td>
</tr>
<tr>
<td width="800" height="100%" bgcolor="#1D1D1D" bordercolor="#FF0000" valign="top">


{include file="$file" }


</td>
</tr>
<tr>



co moge miec nie tak ze zmienna $fille sie nie zmienia ?

[/quote]
Back to top
View user's profile Send private message
fornve
Smarty Rookie


Joined: 25 Apr 2008
Posts: 29
Location: Sheffield, UK

PostPosted: Thu Apr 09, 2009 9:21 am    Post subject: Reply with quote

a co sie pokazuje gdy na poczatku index.php dasz:

var_dump( $show );

woogole skad bierzesz te zmienna?

a moze

var_dump( $_GET[ 'show' ] );

Pozdrawiam
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Language: Polish All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP