主题:  请斑竹讲一下,怎么把数据库中的信息生成cfml文件。

5D荣誉斑竹

职务:普通成员
等级:3
金币:10.0
发贴:751
注册:2001/5/21 21:43:30
#12002/4/16 10:39:55
如题



jaway

职务:普通成员
等级:1
金币:1.0
发贴:153
注册:2002/3/27 8:15:32
#22002/4/16 10:43:30
cffile



5DDC版主

职务:版主
等级:6
金币:10.0
发贴:3820
注册:2002/3/25 21:30:11
#32002/4/16 11:01:01

抓取模板格式!上面可以通过loop或output设置条件,抓取不同的模板。

生成文件,可以通过模板生成各种html\Xml\cfml 文件!



5D荣誉斑竹

职务:普通成员
等级:3
金币:10.0
发贴:751
注册:2001/5/21 21:43:30
#42002/4/16 13:05:39
batyvn在上个帖子中说
引用:

抓取模板格式!上面可以通过loop或output设置条件,抓取不同的模板。

生成文件,可以通过模板生成各种html\Xml\cfml 文件!


倒,太高深了。



5DDC版主

职务:版主
等级:6
金币:10.0
发贴:3820
注册:2002/3/25 21:30:11
#52002/4/16 13:11:53
并不高深!



jaway

职务:普通成员
等级:1
金币:1.0
发贴:153
注册:2002/3/27 8:15:32
#62002/4/16 15:00:32
看看吧
function postWithNamedArgs()
{
// Setup the array of post parameters.
params = new Array();
params[1] = {name:"arg1", type:"FormField", value:"value1"};
params[2] = {name:"arg2", type:"URL", value:"value2"};
params[3] = {name:"arg3", type:"CGI", value:"value3"};

url = "http://localhost:8100/";

path = application.getContext("/").getRealPath("/");
file = "foo.txt";

result = CF.http({method:"post", url:url, username:"karl", password:"salsa",
resolveurl:true, params:params, path:path, file:file});

if (result)
return result.get("Statuscode");
return null;
}

// Example of a basic HTTP get operation
// Shows that get is the default
function basicGet()
{
url = "http://localhost:8100/";

// Invoke with just the url. This is an http get.
result = CF.http(url);
return result.get("Filecontent");
}

// Example showing simple array created to pass params arguments
function postWithParams()
{
// Setup the array of post parameters. These are just like cfhttpparam tags.
params = new Array();
params[1] = {name:"arg2", type:"URL", value:"value2"};

url = "http://localhost:8100/";

// Invoke with the method, url, and params
result = CF.http("post", url, params);
return result.get("Filecontent");
}

// Example with username and params arguments
function postWithParamsAndUser()
{
// Setup the array of post parameters. These are just like cfhttpparam tags.
params = new Array();
params[1] = {name:"arg2", type:"URL", value:"value2"};

url = "http://localhost:8100/";

// Invoke with the method, url, params, username, and password
result = CF.http("post", url, params, "karl", "salsa");
return result.get("Filecontent");
}



编辑历史:[这消息被jaway编辑过(编辑时间2002-04-16 15:01:20)]
[这消息被jaway编辑过(编辑时间2002-04-16 19:33:30)]


5DDC版主

职务:版主
等级:6
金币:10.0
发贴:3820
注册:2002/3/25 21:30:11
#72002/4/16 16:05:36

图片如下:

图片如下:



jaway

职务:普通成员
等级:1
金币:1.0
发贴:153
注册:2002/3/27 8:15:32
#82002/4/16 19:37:20
ColdFusion ActionScript Functions之CF.htttp
的使用例子



5DDC版主

职务:版主
等级:6
金币:10.0
发贴:3820
注册:2002/3/25 21:30:11
#92002/4/17 9:25:12
ColdFusion ActionScript Functions 不就是 cfscript么?
我最近也在用,听说速度比CFTAG速度快!
我感觉写起来也很简单,比CFTAG写的代码少!
我比较懒了!