|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
houpdelta Smarty Rookie
Joined: 06 Dec 2008 Posts: 6
|
Posted: Sat Dec 06, 2008 3:05 pm Post subject: Problème avec header('Location ... |
|
|
Bonjour,
j'ai cherché sur le net, mais je ne trouve pas de solution et j'ai du mal à comprendre pour cela ne fonctionne pas. je débute avec smarty mais bonne connaissance de php
Avec de passer à smarty, cette action fonctionnait très bien en php.
J'ai deux pages "inscrit.tpl" et "inscrit.php" qui contient
Code: |
include_once('../xxxxx');
//si l'on est connecter alors on peut allez sur la page compte.php
if ($log->ok)
{
header('Location: ../'.URL_REP_user.'/'.URL_REP_compte);
exit;
}
$smarty->display('user/inscrit.tpl');
|
Lorsque je repasse par la page inscrit.php et $log->ok est à vrai j'ai une erreur "Warning: Cannot modify header information ... inscrit.php".
Je ne comprends pas car ma page .tpl ne devrait pas déjà être appelé car l'appel se trouve après la redirection.
Si quelqu'un peut m'expliquer ce phénomène et m'apporter une solution ? |
|
Back to top |
|
houpdelta Smarty Rookie
Joined: 06 Dec 2008 Posts: 6
|
Posted: Sat Dec 06, 2008 5:05 pm Post subject: la solution : |
|
|
J'ai eu une partie de ma réponse à mon problème sur le forum anglais
Donc j'avais une ligne vide derrière la balise ?>
et de plus mes fichiers étaient codés en UTF8 , j'ai été obligé de les passer en "Europe occidental" |
|
Back to top |
|
|
|
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
|