哥哥们救我呀 asp数组问题
我想写个函数中间用到传递数组
但是我不会
我的函数是
<%
sub shengcheng(template,yuan(),tihuan(),szgs,shuchu)
dim fso, strhtml,HtmlFileName,strnohtml,yuan1(7),tihuan1(7)
set fso=server.createobject("scripting.filesystemobject")
htmlfilename=server.mappath(template)
set ctf=fso.opentextfile(htmlfilename,1,,0)
do while ctf.atendofstream<>true
str=ctf.readline
strnohtml=strnohtml&str
loop
ctf.close
set ctf=nothing
yuan1()=yuan
tihuan()=tihuan
yuanxing=strnohtml
int i
for i=0 to szgs
yuanxing=replace(yuanxing,yuan(i),tihuan(i))
next
ymm=year(now)&month(now)&day(now)&hour(now)&minute(now)&second(now)&"new.html"
file1=server.mappath(shuchu&ymm)
set fout=fso.createTextfile(file1)
fout.writeline yuanxing
fout.close
set fout=nothing
set fso=nothing
response.write("sdfsdf")
end sub
%>
调用是::
<%@LANGUAGE="VBSCRIPT" CODEPAGE="CP_ACP"%>
<!--#include file="../卫华网站/inc/tihuan.inc" -->
<% template="./new.html"
dim yuan(6),tihuan(6)
yuan(0)="$$new_bt$$"
yuan(1)="$$yhzh$$"
yuan(2)="$$new_date$$"
yuan(3)="$$new_ly$$"
yuan(4)="$$new_zy$$"
yuan(5)="$$new_zw$$"
tihuan(0)="1"
tihuan(1)="2"
tihuan(2)="3"
tihuan(3)="4"
tihuan(4)="5"
tihuan(5)="6"
shuchu="./"
call shengcheng(template,yuan(),tihuan(),7,shuchu)
Response.Write("sdfasdf")
%>
但是他老是报:
Microsoft VBScript 运行时错误 错误 '800a0009'
下标越界
/rrrrr/zhuanhuan.asp,行18
帮忙看一下吧