>- see footer for list info -<
It might not cause it to choke but you're using / instead of \
"<cfif FileExists("c:/visitorlog.txt")>"
I don't think you need to check the file exists when using append, if it
doesn't it gets created. Unless someone knows different.
Ade
-----Original Message-----
From: Paul Swingewood [mailto:[EMAIL PROTECTED]
Sent: 09 November 2004 17:48
To: [EMAIL PROTECTED]
Subject: Re: [CF-Dev] cheap & cheerful
>- see footer for list info -<
This is so weird ....
If I use this code ....
<CFSET address = cgi.remote_addr>
<CFSET referer = cgi.http_referer>
<CFSET page = cgi.script_name>
<CFIF NOT LEN(referer)>
<CFSET referer = "unknown">
</cfif>
<cffile action="Append"
file="visitorlog.txt"
output="lsdateformat(datenow(), dd-mm-yyyy) IP Address - #address#
Refering
Page - #referer# Page Viewed - #page#">
I get the text file in c:\cfsusion\runtime\bin (Ok the datenow doesn't work
but the file is written)
If I use this code ....
<!--- Log Visitors --->
<cfoutput>
<cfsavecontent variable="thisOutput">
#lsdateformat(now(), "dd-mm-yyyy")# IP Address - #cgi.remote_addr# Refering
Page - #IIF(Len(cgi.http_referer),DE(cgi.http_referer),de('unknown'))# Page
Viewed - #cgi.script_name#?#cgi.query_string#
</cfsavecontent>
</cfoutput>
<cfif FileExists("c:/visitorlog.txt")>
<cffile action="Append"
file="visitorlog.txt"
output="#thisoutput#">
<cfelse>
<cffile action="Write"
file="visitorlog.txt"
output="#thisoutput#">
</cfif>
I get bugger alll .....
Regards - Paul - Back to original code me thinks ...
_______________________________________________
For details on ALL mailing lists and for joining or leaving lists, go to
http://list.cfdeveloper.co.uk/mailman/listinfo
--
CFDeveloper Sponsors:-
>- Hosting provided by www.cfmxhosting.co.uk -<
>- Forum provided by www.fusetalk.com -<
>- DHTML Menus provided by www.APYCOM.com -<
>- Lists hosted by www.Gradwell.com -<
>- CFdeveloper is run by Russ Michaels, feel free to volunteer your help
>-<
_______________________________________________
For details on ALL mailing lists and for joining or leaving lists, go to
http://list.cfdeveloper.co.uk/mailman/listinfo
--
CFDeveloper Sponsors:-
>- Hosting provided by www.cfmxhosting.co.uk -<
>- Forum provided by www.fusetalk.com -<
>- DHTML Menus provided by www.APYCOM.com -<
>- Lists hosted by www.Gradwell.com -<
>- CFdeveloper is run by Russ Michaels, feel free to volunteer your help -<