Hi,
I have a script/include, called checklging, which I include at my pages, to check wether people are logged in. If not: They are moved to the login page.
Since this package will be moved around a lot, I want to create the paths dynamic (Now there is just document_root included, later it will also be a $path variable: $_SERVER['DOCUMENT_ROOT'].$path."....";
But I cannot get this right. I keep getting a redirect error (So not "Page cannot be found, or parse error!). What am I doing wrong? This is the code of the include:
<?php
session_start() ;
if (!$_SESSION['logged_in'])
{
header("Location: ". $_SERVER['DOCUMENT_ROOT']."public/spectradatabase/routines/userlogin.php");
}
?>