<%
dim choose,path,mydb,myset,SQL,fs,mp3
' 获得用户提交表单(list.htm)选中的曲目对应的id号,并将其赋给字串变量choose.
choose=“("
for i=3 to request.form.count
choose=choose+request.form(i)+“,"
next
choose=left(choose,len(choose)-1)+“)"
if choose=“()" then
response.redirect(“list.htm")
response.end
' 判断choose变量,如果不包含id号,说明list.htm中没有选中任何歌曲,终止程序.
end if
path=“E:\inetpub\wwwroot\temp\"
' 设置文件路径,把temp目录的权限设为对internet匿名用户具有read & write 权限.
Set fs = CreateObject(“Scripting.FileSystemObject")
Set mp3 = fs.CreateTextFile(path+“listen.m3u", True)
' 创建文件对象.
set mydb=server.createobject(“adodb.connection")
' 创建数据库对象.
mydb.open “music"
SQL=“select mp3name,url from "&dbname&“where id in "&choose set myset=tdb.execute(SQL)
do while not myset.eof
' 检索数据库,获得曲目信息.
mp3.Write(“http://"+myset(“url")+chr(10))
myset.movenext
' 生成点播曲目文件列表.
loop
SQL=“update music set click=click+1,
this=this+1 where id in "&choose
mydb.execute(SQL)
' 更新数据库中的当天点播次数和总共点播次数.
set myset=nothing
mydb.close
set mydb=nothing
mp3.close
set mp3=nothing
' 清空.
response.redirect(“listen.m3u")
' 将该文件下传到用户.
response.end
%>
[1]
大家好,我是狂聊君。 今天来聊一聊 Mysql 缓存池原理。 提纲附上,话不多说,直...
本文转载自微信公众号「SQL数据库」,作者丶平凡世界 。转载本文请联系开发公众...
本文实例讲述了AJAX+Servlet实现的数据处理显示功能。分享给大家供大家参考,具...
CKeditor,以前叫FCKeditor,已经使用过好多年了,功能自然没的说。最近升级到3....
来源:DeepenStudy 漏洞文件:js.asp % Dimoblog setoblog=newclass_sys oblog.a...
前言 项目开发中不管是前台还是后台都会遇到烦人的null,数据库表中字段允许空值...
本文转载自微信公众号「SH的全栈笔记」,作者SH。转载本文请联系SH的全栈笔记公...
idea官方推送了2020.2.4版本的更新,那么大家最关心的问题来了,之前激活idea202...
问题:我们在做flex的开发中,如果用到别人搭建好的框架,而别人的server名称往...
在Flash Player 10.1及以上版本中,adobe新增了全局错误处理程序UncaughtErrorEv...