求大神加个 if 语句本帖最后由 awp5478 于 2013-08-14 15:11:49 编辑%dim str,spset rsconn.execute(se
求大神加个 if 语句
本帖最后由 awp5478 于 2013-08-14 15:11:49 编辑
<%
dim str,sp
set rs=conn.execute("select * from light where id="&request("id"))
str=rs("picname")
sp=split(str,",")
%>
<%for i=0 to ubound(sp)%>
<table align="center">
<tr>
<td>
<img src="http://img.baidu.com/ke/<%=sp(i)%>" border="0" width="700"><p>
</td>
</tr>
</table>
<%next%>
正常情况运行上面的,否则就是下面的代码,怎么在上面加 if 语句
<%else%>
没有文件
<%end if%>
[解决办法]
str=rs("picname")
if str<> "" then
sp=split(str,",")
else
sp=null
end if
if IsArray(sp) then
