I want create a log file. I tried but its show me an error. Can anyone help? I show my full code here:
http://pastebin.com/SxAMCUnv
Please see this line. I d
comments tl;dr version - This answer worked but asker began asking questions about the new error, he was urged to create a new question.
Answer:
I don't see this line in the link you posted (I searched for api.log). Invalid CFML construct typically means you have a syntax error, usually forgetting a closing quote, second pound, or closing your tag (greater than). If the below suggestion doesn't work, look above or below the line containing the cffile for a missing part of a closing pair.
The code you posted:
...does not have a closing greater than to close your tag. If that is your actual code, I would suspect that is the problem.
^^^ this is missing right here
If you're not going to take Adam's suggestion and use cflog (which you should), you also probably want action="append" or you will keep overwriting the file with the contents of fileContent.
==edit==
On a side note, this will not solve your problem but you should be using cfqueryparam, especially when using user entered data.
For example:
Select *
FROM Purchasers
WHERE PurchaserID = #PurchaserID#
Should be
Select *
FROM Purchasers
WHERE PurchaserID =