ich habe bei mir einen counter unter verwendung von WIN NT installiert, der gibt mir jedoch die folgende Fehlermeldung heraus:
Warning: open(/tmp\sess_d85149cf163e3b9143cb6181d19e8a28, O_RDWR) failed: m (2) in c:\programme\apache group\apache\htdocs\counter\counter.php on line 27
Jinx M's simple hit counter thingy.
Weiss jemand was da falsch ist?
Hier ist der counter.php - Script:
<?
##########################################
# #
# Jinx M's Basic Hit Counter #
# #
# www.jinxm.co.uk spam@jinxm.co.uk #
# #
##########################################
###############################################################################################
#
# Although there are probably better ways of doing this, I had to work it out for myself.
# Its a simple script looking at it now, yes, but working out how to do it was a learning
# process for me.
#
# So please, don't pass this script off as your own work or make money out of it in any way.
# If you distribute it, please distributed it along with the readme.txt file.
#
###############################################################################################
#version 1.0
# Righto, get all the variables and stuff from the edit.me file
include ('edit.me');
# set a session ID
session_start();
# This is the bit which adds to the count.txt file
if ($count_what == 'visitors') {
# First it creates a session Id for each visit so that it counts
# visits rather than how many times a page is loaded.
if (!$PHPSESSID) {
$thefile = file("count.txt");
$count = implode("", $thefile);
$count++;
$myfile = fopen("count.txt","w");
fputs($myfile,$count);
fclose($myfile);
}
# done
}
else {
# Else it will count every page load
$thefile = file("count.txt");
$count = implode("", $thefile);
$count++;
$myfile = fopen("count.txt","w");
fputs($myfile,$count);
fclose($myfile);
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Text Counter</title>
</head>
<body bgcolor="Black" text="Silver">
Jinx M's simple hit counter thingy.
<p>You have had:
<!-- Now read the count.txt file and print it -->
<!-- You can surround this with HTML like <font> tags or whatever -->
<?
$thefile = file("count.txt");
$count = implode("", $thefile);
# now print either the text version...
if ($print_what == 'text') {
print $count;
}
#else print graphics
else {
$num = strlen ($count);
$i = 0;
while ($i < $num) :
$graphic = substr ($count, $i, 1);
print "<img src=\"$url/$graphic.$ext\" border=\"0\" alt=\"$graphic\">";
$i++;
endwhile;
}
?>
hits.</p>
</body>
</html>