头大了,看看问题出在哪里,300分
当打开这个页面时总是跳到另一个页面
我靠 ,烦死了 help me
我以为是缓存,清了,还是不行,改名,把那两个文件提出来,换虚拟目录
都试了,就是搞不定 ,up up up ……
yxplay.asp
<script>if(top==self)top.location="1" </script>
<!--#include file="conn.asp"-->
<%
if request("id")<>"" then
'response.write cstr(request.Cookies("Bookbaby_Music")("User_Name"))
'response.end
set rs=server.createobject("adodb.recordset")
id=request("id")
sql="select * from MusicList where id="&id
rs.open sql,conn,1,3
if rs.eof then
errmsg="<li>对不起!该歌曲不存在,可能已经被管理员删除。</li>"
call error()
Response.End
else
rs("hits")=rs("hits")+1
rs.Update
id=rs("id")
Wma=rs("Wma")
hits=rs("hits")
Singer=rs("Singer")
MusicName=rs("MusicName")
rs.Close
if(request.Cookies("Bookbaby_Music")("User_Name")<>"") then
set rs=server.createobject("adodb.recordset")
sql="select * from user where username='"&cstr(trim(request.Cookies("Bookbaby_Music")("User_Name")))&"'"
rs.open sql,conn,1,3
if rs.eof then
errmsg= "<li>请选择歌曲!</li>"
call error()
else
rs("User_Score")=rs("User_Score")+3
rs.Update
end if
rs.Close
end if
end if
else
errmsg= "<li>请选择歌曲!</li>"
call error()
Response.End
end if
set rs=nothing
conn.close
set conn=nothing
%>
<html>
<head>
<title>中创梦网音乐频道--WMA格式在线试听</title>
<script language="JavaScript">
document.oncontextmenu=Click;
function Click(){
alert('欢迎光临中创梦网音乐频道 ^_^');
window.event.returnValue=false;
}
</script>
<style type="text/css">
<!--
td { font-size: 9pt; color: #000000}
a:link { font-size: 9pt; color:#000000; text-decoration: none}
a:active { font-size: 9pt; ; text-decoration: underline}
a:visited { font-size: 9pt; color: #000000; text-decoration: none}
a:hover { font-size: 9pt; color:#000000; text-decoration: underline; background-color: #00FFFF}
-->
</style>
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
</head>
<BODY >
<p align="left"></p>
<p align="left"> </p>
<div align="center">
<center>
<table width="100%" border="0" cellspacing="1" height="274">
<tr>
<td height="205">
<p align="left">歌手:<%=Singer%></p>
<p align="left">歌名:<%=MusicName%></p>
<p align="left">试听:<%=hits%>次 </p>
<br><br>
<p align=left></p>
<p align="left"><a href="WMediaPlayer7.1.exe" target="NEW" title="下载安装Windows-Media-Player7.1以上才能听歌,请点击下载"><font color=#000000>不能正常听歌请安装此软件</font></a></p>
</td>
<td width="63%" height="205">
<p align="right">
</p>
</td>
</tr>
<tr>
<td height="61"> </td>
<td width="63%" height="61">
<p align="left"> </p>
</td>
</tr>
</table>
</center>
</div>
</BODY></HTML>
conn.asp
<%
dim conn
dim dbpath
set conn=server.createobject("adodb.connection")
DBPath = Server.MapPath("admin.mdb")
conn.Open "driver={Microsoft Access Driver (*.mdb)};dbq=" & DBPath
%>
保存一下,调试试试 ,我怎么就搞不定