Session save path
Hejsa,Dette spørgsmål er vedr: http://www.eksperten.dk/spm/448200
Jeg har stadig problemer med dette (stien), og den anden er åbenbart kommet for langt tilbage.
Jeg har snakket med min host og fået at vide at stien til save path er: /tmp
-----------------------
Svar fra supporten:
-----------------------
The path to the session save directory is /tmp - you should have access to open this directory and read and write from it. For more help with the script, you may want to contact the scripts creator or visit their website is they have one.
-----------------------
-----------------------
Script:
-----------------------
<? session_start();?>
<html>
<head>
<title> Online brugere </title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<?
define("MAX_IDLE_TIME", 3);
function getOnlineUsers() {
if ($directory_handle = opendir(session_save_path())) {
$count = 0;
while (false !== ($file = readdir($directory_handle))) {
if ($file != '.' && $file != '..') {
if (time() - fileatime(session_save_path() . '\\' . $file) < MAX_IDLE_TIME * 60) {
$count++;
}
}
}
closedir($directory_handle);
return ($count);
} else {
return false;
}
}
echo 'Number of online users: ' . getOnlineUsers() . '<br>';
?>
-----------------------
Fejl
-----------------------
Warning: fileatime(): Stat failed for /tmp\horde.log (errno=2 - No such file or directory) in /home/fedtmco/public_html/tl/index.php on line 167
