sql="select * from love_main where username='"&username1&"'"
set rs1 = Server.CreateObject("ADODB.Recordset")
rs1.Open sql,conn,1,1
If rs1("photo_x_flag")="1" and rs1("photo_d_flag")="1" Then'大小都有
response.write "<img src=../../photo/"&rs1("photo_x")&" width=60 border=0 hspace=4 vspace=4 >"
ElseIf rs1("photo_x_flag")="1" and rs1("photo_d_flag")="0" Then'有小无大
response.write "<img src=../../photo/"&rs1("photo_x")&" width=60 border=0 hspace=4 vspace=4 >"
ElseIf rs1("photo_d_flag")="1" and rs1("photo_x_flag")="0" Then'有大无小
response.write "<img src=../../photo/"&rs1("photo_d")&" width=60 border=0 hspace=4 vspace=4 >"
Else
if rs1("sex")="男" then
response.write "<img src=images/nophoto_man.gif width=60 hspace=4 vspace=4>"
else
response.write "<img src=images/nophoto_woman.gif width=60 hspace=4 vspace=4>"
end if
End If
rs1.close
%>
我看不出代码哪错了.在别的文件里也没事就是放到这个网页就是不行了..不知道为什么..帮我看一下.