Sunday, March 28, 2010

cffile

%26lt;cffile action=''write'' file=''#currentDirectory#\#listfirst(titl, 2)##listfirst(subj, 2)##listfirst(clip_by, 2)#_#GETNEWCLIPID#.cfm''

output=''

here I want to past entire file with many '''' '''' like

%26lt;script type=''text/javascript''%26gt;
function MM_CheckFlashVersion(reqVerStr,msg){
?with(navigator){
?var isIE?= (appVersion.indexOf(''MSIE'') != -1 %26amp;%26amp; userAgent.indexOf(''Opera'') == -1);
?var isWin = (appVersion.toLowerCase().indexOf(''win'') != -1);
?if (!isIE || !isWin){?
?var flashVer = -1;
?if (plugins %26amp;%26amp; plugins.length %26gt; 0){
?var desc = plugins[''Shockwave Flash''] ? plugins[''Shockwave Flash''].description : '''';
?desc = plugins[''Shockwave Flash 2.0''] ? plugins[''Shockwave Flash 2.0''].description : desc;
?if (desc == '''') flashVer = -1;
?else{
?var descArr = desc.split('' '');
?var tempArrMajor = descArr[2].split(''.'');

''%26gt;

red fonts has many inverted comas that gives error. How can I do this task?

I also did try with creating variable for these entire texts

like

%26lt;cfset contentforfile = ''entiretext '''' '''' ''etc'' ''etc'' I wanted''%26gt;

%26lt;output = ''#contentforfile#''%26gt; but it didnot work.

can any one help me how can I make one block that can be used to create entire content in writing new file?

cffile

If the text contains double quotes, surround it with single quotes in your cfset tag.

cffile

I recommend reading up on how %26lt;cfsavecontent%26gt; will enable you to save large strings of data as a variable.

http://livedocs.adobe.com/coldfusion/8/htmldocs/Tags_r-s_10.html#1844410

--

Adam

No comments:

Post a Comment