php经典项目:DLL封装ASP代码后再接受外部参数
来源:百度文库 编辑:杭州交通信息网 时间:2024/06/08 15:50:05
DLL已经成功封装了ASP代码,各项输出都正常,但现在想在这样设计:
DLL中在Public中加入:
Public Function cms() as string
cms="前置任意代码-" & a & "-中间任意代码" & b & "后置任意代码"
End Public
test.asp的代码中:
Set mydll=server.createobject("dll.classm")
a="12345678"
b="fgdtert"
response.write mydll.cms
这时候a,b的值并不能成功输出,请问DLL中应如何定义,取得a,b的值
brucehe3 回答mydll.cms(a)并不能解决我的问题,测试不能成功
还请高手回答
DLL中在Public中加入:
Public Function cms() as string
cms="前置任意代码-" & a & "-中间任意代码" & b & "后置任意代码"
End Public
test.asp的代码中:
Set mydll=server.createobject("dll.classm")
a="12345678"
b="fgdtert"
response.write mydll.cms
这时候a,b的值并不能成功输出,请问DLL中应如何定义,取得a,b的值
brucehe3 回答mydll.cms(a)并不能解决我的问题,测试不能成功
还请高手回答
test.asp的代码中:
Set mydll=server.createobject("dll.classm")
a="12345678"
b="fgdtert"
response.write mydll.cms
上面的这段话错误了,第3,4行,
可以尝试这样修改:
DLL中在Public中加入:
Public Function cms(ByVal a as string, ByVal b as string) as string
cms="前置任意代码-" & a & "-中间任意代码" & b & "后置任意代码"
End Public
test.asp的代码中:
Set mydll=server.createobject("dll.classm")
a="12345678"
b="fgdtert"
response.write mydll.cms(a, b)
现在asp不都是开源嘛,,封装asp没大意义吧