Passaggio Variabili tra 2 file.php in 1 file.tpl
Ciao a tutti!
ho un problema .... devo passare 2 variabili(una da un file.php, e l'altra da un altro file php) in 1 file di tipo .tpl .... per poi da questo file eseguire un redirect ritardato con messaggio.
io ho scritto così...nel primo file.php:
Codice PHP:
//IDENTIFICA L'URL DELLA BARRA DEGLI INDIRIZZI
$url_pach = ($_SERVER['PHP_SELF']);
//print $url_pach;
$tplurlpach = new TplLoad();
$tplurlpach->assign("url_pach","$url_pach");
$tplurlpach->display("url_pach_common.tpl");
//END
e nel secondo file.php:
Codice PHP:
//IDENTIFICA L'URL DELLA BARRA DEGLI INDIRIZZI
$url_pach_intspace = ($_SERVER['PHP_SELF']);
//print $url_pach_intspace;
$tplurlpach = new TplLoad();
$tplurlpach->assign("url_pach_intspace","$url_pach_intspace");
$tplurlpach->display("url_pach_common.tpl");
//END
e nel file.tpl
Codice HTML:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
</head>
<body>
{php}
print $url_pach;
print $url_pach_intspace;
if (($url_pach == "") && ($url_pach_intspace == "member_login.php")) redirect ("index.php");
{/php}
</body>
</html>
il problema che le 2 variabili sono nulle nel file .tpl perchè non visualizza nessun valore....
Dove sbaglio?
Grazie.