Page 1 of 1
session_start()
Posted: Mon Sep 26, 2005 2:07 pm
by Ree
Is it fine to use any statements (that don't output anything) BEFORE using session_start(), such as this:
Code: Select all
<?php
define('path', 'value');
include(path . '/file.php');
session_start();
$_SESSION['msg'] = 'Is that ok?';
?>
Posted: Mon Sep 26, 2005 2:09 pm
by feyd
so long as there is no output, yes.
Posted: Mon Sep 26, 2005 2:10 pm
by shiznatix
yes. as long as nothing is outputted to the browser first, not even a blank space
edit: im too slow

Posted: Mon Sep 26, 2005 2:11 pm
by Ree
Good then.
off-topic: feyd, you're alive answering machine

. If you see orange
feyd name as an online user, you can almost 100% be sure you'll get the answer in no time. You're doing a great job, really.
Posted: Mon Sep 26, 2005 2:24 pm
by feyd
thanks.. too bad I don't get paid for it.

Posted: Mon Sep 26, 2005 3:48 pm
by Charles256
i'm telling you.i sit online praying i can beat him to hte punch.
