需要在传入表单以后做字符处理,
<%
if (not IsNumeric(Xgdh)) and (not Xgdh="") then
success=0
i=i+1
errorwords=errorwords & cstr(i) & "." & "非法字符出现在相关单号中;<br>"
end if
%>
<% if not instr(Ly,"<")=0 then
success=0
i=i+1
errorwords=errorwords & cstr(i) & "." & "非法字符出现在产品来源中;<br>"
end if
%>
以上两个函数是检查是否是数字和有没有非法字符“'<>”等等,注意那些网页有关的代码,
否则别人在你的表单域里面填写aspjsp代码,可能毁坏你的网站。
<%
if (not IsNumeric(Xgdh)) and (not Xgdh="") then
success=0
i=i+1
errorwords=errorwords & cstr(i) & "." & "非法字符出现在相关单号中;<br>"
end if
%>
<% if not instr(Ly,"<")=0 then
success=0
i=i+1
errorwords=errorwords & cstr(i) & "." & "非法字符出现在产品来源中;<br>"
end if
%>
以上两个函数是检查是否是数字和有没有非法字符“'<>”等等,注意那些网页有关的代码,
否则别人在你的表单域里面填写aspjsp代码,可能毁坏你的网站。
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货