Cgi Counter
Paul Rubin
phr-n2001d at nightsong.com
Tue Oct 16 09:58:28 EDT 2001
Nomad <nomad***@***freemail.absa.co.za> writes:
> On Fri, 12 Oct 2001 12:59:04 -0700 (PDT), Neal Irwin
> ...>
> fileWrite = open('count.txt', 'w')
> fileWrite.write(str(intHits))
> fileWrite.close
> ...
> Pretty simple, but it works...
Um, what happens if two requests (coming from different processes in
the web server) run the hit counter at the same time? You need some
kind of interlocking for this to be reliable.
More information about the Python-list
mailing list