Reputation: 1387
I type a simple loop code in coldfusion. But why it cant show out the result. It just print out all the thing inside ....
This my code :
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Test Loop</title>
</head>
<body>
<cfscript>
i=0;
for(i; i < 10; i++){
WriteOutput("Current Position: #i# <br />") ;
}
</cfscript>
</body>
</html>
The result print out as :
i = 0; for (i=1; i LTE 10; i=i+1) { WriteOutput("Current Position: #i# ") ; }
Upvotes: 0
Views: 109
Reputation: 29870
It looks to me like the web server is not passing the request to ColdFusion to be processed.
You might need to re-run your web server connector.
Other than that, is this code in a file with a CFM extension, or at least an extension that the web server has been configured to pass to CF for processing?
Did this just start happening in an otherwise previously stable environment, or is this a new install? Do any CFML requests process correctly?
Upvotes: 5