- 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 -<

Reply via email to