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

Cookie

 
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: German
View previous topic :: View next topic  
Author Message
the-styler
Smarty Rookie


Joined: 12 Jul 2004
Posts: 25

PostPosted: Tue Aug 17, 2004 6:39 pm    Post subject: Cookie Reply with quote

Smarty scheint probleme mit cookies zu haben. Ich habe mir gerade ein script geschrieben, was einen cookie setzt. Immer wenn der Cookie gesetzt wird, meckert smarty das der header schon gesendet wurde. Folge ist, der Cookie wird nicht richtig gesetzt. Was mache ich falsch?
Back to top
View user's profile Send private message
coach
Smarty Regular


Joined: 03 Jun 2004
Posts: 65

PostPosted: Wed Aug 18, 2004 5:20 pm    Post subject: Reply with quote

Hallo, das liegt nicht an Smarty oder PHP, sondern an dir. Du mußt zuerst Cookies setzen und darfst erst dann Ausgaben machen.

Alternativ kannst du mit Output-Buffering arbeiten.

[php:1:e0e7f97bb6]<?php
ob_start();

// deine Ausgaben

// Cookie setzen

ob_end_flush();
?>[/php:1:e0e7f97bb6]
Back to top
View user's profile Send private message
the-styler
Smarty Rookie


Joined: 12 Jul 2004
Posts: 25

PostPosted: Sun Aug 22, 2004 7:58 pm    Post subject: Reply with quote

also mir ist schon klar das erst der cookie gesetzt werden muss und dann eine ausgabe gestartet werden kann weil so unerfahren bin ich nicht. was meinst du warum ich hier reingeschrieben habe, gerade weil ich diese verhalten merkwürdig fand. habe aber inzwischen das problem gelößt da es an meiner einbind methode von smarty lag. die kurz geändert und jetzt funzt alles.
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: German 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