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

Problème avec header('Location ...

 
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: French
View previous topic :: View next topic  
Author Message
houpdelta
Smarty Rookie


Joined: 06 Dec 2008
Posts: 6

PostPosted: Sat Dec 06, 2008 3:05 pm    Post subject: Problème avec header('Location ... Reply with quote

Bonjour,

j'ai cherché sur le net, mais je ne trouve pas de solution Evil or Very Mad 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. Exclamation

Very Happy Si quelqu'un peut m'expliquer ce phénomène et m'apporter une solution ?
Back to top
View user's profile Send private message
houpdelta
Smarty Rookie


Joined: 06 Dec 2008
Posts: 6

PostPosted: Sat Dec 06, 2008 5:05 pm    Post subject: la solution : Reply with quote

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
View user's profile Send private message
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: French 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