|
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 |
the-styler Smarty Rookie
Joined: 12 Jul 2004 Posts: 25
|
Posted: Tue Aug 17, 2004 6:39 pm Post subject: Cookie |
|
|
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 |
|
coach Smarty Regular
Joined: 03 Jun 2004 Posts: 65
|
Posted: Wed Aug 18, 2004 5:20 pm Post subject: |
|
|
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 |
|
the-styler Smarty Rookie
Joined: 12 Jul 2004 Posts: 25
|
Posted: Sun Aug 22, 2004 7:58 pm Post subject: |
|
|
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 |
|
|
|
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
|