蛰怎么读音是什么:XML报出500错误,急求解决办法!

来源:百度文库 编辑:查人人中国名人网 时间:2024/04/28 11:59:23
高手请看

http://www.byle.cn/MusicList/mmc_4626.htm
请随便选一首歌点歌词的按钮,过会会提示500错误,这是为什么???

歌词是截取百度数据的,一下是显示歌词的ASP文件代码
<!--#include file="conn.asp"-->
<!--#include file="stAR.INC"-->
<!--#include file="functionuser.asp"-->
<!--#include file="byleconst.asp"-->
<%
id=trim(request.QueryString("id"))
if id="" then
errmsg="<li>请选择歌曲!</li>"
call error()
Response.End
end if
set rs=server.createobject("adodb.recordset")
sql="select * from MusicList where id="&cstr(id)
rs.open sql,conn,1,1
if rs.EOF then
errmsg="<br><li>服务器出错!请联系管理员</li>"
call error()
Response.End
else
MusicName=rs("MusicName")
end if
rs.close
%>
<%
'声明取得目标信息的函数,通过XML组件实现。
Function GetURL(url)
Set Retrieval = CreateObject("Microsoft.XMLHTTP")
With Retrieval
.Open "GET", url, False
.Send
GetURL = bytes2bstr(.responsebody)
'对取得信息进行验证,如果信息长度小于100则说明截取失败
if len(.responsebody)<100 then
response.write "获取远程文件 <a href="&url&" target=_blank>"&url&"</a>失败."
response.end
end if

End With
Set Retrieval = Nothing
End Function
'二进制转字符串,否则会出现乱码。
Function bytes2bstr(vin)
strrerurn = ""
for i = 1 to lenb(vin)
thischarcode = ascb(midb(vin,i,1))
if thischarcode < &h80 then
strreturn = strreturn & chr(thischarcode)
else
nextcharcode = ascb(midb(vin,i+1,1))
strreturn = strreturn & chr(clng(thischarcode) * &h100 + cint(nextcharcode))
i = i + 1
end if
next
bytes2bstr = strreturn
end function
'声明截取的格式,从Start开始截取,到Last为结束
Function GetKey(HTML,Start,Last)
if instr(Html,"<td width=""400"" class=""border"">")>0 then
filearray=split(HTML,Start)
filearray2=split(filearray(1),Last)
GetKey=filearray2(0)
else
Response.Write"不好意思,没有找到歌词"
end if
End Function

'要获取页面的URL
Url="http://mp3.baidu.com/m?f=ms&rn=10&tn=baidump3lyric&ct=150994944&word="&MusicName&"&lm=-1"
Html = GetURL(Url)
'截取采集对象页
Songword = GetKey(Html,"<td width=""400"" class=""border"">","<br><br><br>")
%>
<html>
<head><title>歌词:==<%=Singer%>==<%=MusicName%></title>
<LINK href="../images/index.css" rel=stylesheet type=text/css>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<div align="center">
<div align="left">
<table border="0" width="300" bgcolor="#FFFFFF">
<tr>
<td><%Response.Write SongWord%></td>
</tr>
</table>
</div>
</html>
<%
set rs=nothing
conn.close
set conn=nothing
%>

更郁闷的是,我127.0.0.1本机调试没有问题,一切正常... 为什么啊?? 而且,这个发到网上前一阵子也没问题,就这几天突然坏了..

请高手解答!
有没有更好的办法??? 好像不是空间商问题..

向你的主机服务商要你的日志来看看。