0
我無法說服爲什麼我不能用coldfusion在記事本中斷行。在Coldfusion記事本中斷行
這裏是我的編碼
<cfscript>
msg = "ppshein<CR>Coldfusion Developer<CR>Currently working in Singapore";
currentPath = getCurrentTemplatePath();
currentDirectory = getDirectoryFromPath(currentPath);
chgMsg = ReReplace(msg, "<CR>", "<CR>\r\n", "ALL");
FileWrite("#currentDirectory#\myfile.txt", "#chgMsg#");
return "successfully generated";
</cfscript>
我運行上面的編碼和開放的myfile.txt什麼,它發生,所以
ppshein<CR>Coldfusion Developer<CR>Currently working in Singapore
我要的是
ppshein<CR>
Coldfusion Developer<CR>
Currently working in Singapore
任何評論都不勝感激。
天哪..對。我給了錯誤的代碼。實際代碼如下。 chgMsg =替換(msg,「」,「」&chr(13),「ALL」); 我忘了在chr(13)之後放置chr(10)。謝謝你的時間。 –
ppshein
2010-11-22 12:07:55