出没于网
  Goldtimes.net 互联网重回黄金时代!
国内唯一诚信、实用、合法的网络赚钱指南网站
日志首页  | 互联网 | 技术新知 | Goldtimes | Linux | .NET | JavaScript | AJAX | ASP | MSSql | PHP | MySql | Flash | 收藏 | 站长手记
国内唯一诚信、实用、合法的网络赚钱指南网站
用户登陆
用户:
密码:
 

站点日历
73 2010 - 9 48
   1234
567891011
12131415161718
19202122232425
2627282930

站点公告
Goldtimes.net全面改版中...
本站今后将以原创文章、教程为主,谢谢大家的支持,大家还有什么好的建议或意见,都可以在这里提出!
站长简介:
Agang,生于八十年代.多年媒体及互联网从业经验,关注互联网、电子商务和网络技术.中国商贸网(tradevnet.cn)创办人
blog.goldtimes.net
国内唯一专注于web2.0源码收藏,分享的技术blog

站点统计

联系方式
手机:13686861114
QQ:993715476
Email:anyshop@126.com

最新评论(删除/引用)

日志搜索

 标题   内容

友情链接

BLOG编码
RSS 1.0
RSS 2.0
创作共用协议
[1] [2] [3] 

request 对象 错误 'asp 0206 : 80004005'

不能调用 binaryread

/my/upload.inc,行 51

使用 request.form 集合之后,不能调用 binaryread。

upload.inc代码前的文件,和包含的文件不得含有request.form

/my/upload.inc



作者:admin | 分类:ASP | 评论:0 | 引用:0 | 查看:203


<%
 set conn=server.createobject("adodb.connection")
 conn.open "driver={microsoft access driver (*.mdb)};dbq=" & server.mappath("mydatabase/#visitcount.mdb")
 phoneaccept=request.servervariables("http_accept") '支持的文件类型
 phoneip = request.servervariables("remote_addr")        '客户端的ip地址 
 phonenumber=request.querystring("phonenumber") & request.servervariables("http_x_up_calling_line_id") & request.servervariables("deviceid")
 visitfile =request.servervariables("http_url")             '访问的文件路径
 phoneuseragent = request.servervariables("http_user_agent")
 if phoneip="218.12.56.224" then  ' or phoneip="211.94.69.240"
 ' iswriteindb="false"   '如果取到的为自己调试的ip地址,则不写入数据表。屏蔽此句,可以记录所有ip访问。
 end if
 'if instr(terminal,"m3gate")<>0 then '
 ' iswriteindb="false"   '开发人员用m3gate调试。
 'end if 
 if instr(phoneuseragent,"mozilla")<>0 then
 ' iswriteindb="false" '非手机和wap模拟器都不写入数据库
 end if
 if phoneip=session("phoneip") then  
 ' iswriteindb="false"   '不是每次访问都写入。防止重复写入较多同一地址
 end if
 ' session.timeout=30 '设置session的时间为60分钟。
 ' session("phoneip")=phoneip
%> 

<%
 'if iswriteindb<>"false" then
  strsql="insert into visitcount(phonenumber,phoneip,phoneuseragent,phoneaccept,visitfile) values (" & "'" & phonenumber & "','" & phoneip & "','" & phoneuseragent & "','" & phoneaccept & "','" & visitfile & "')"
  set rs=conn.execute(strsql)
 'end if
%>



作者:admin | 分类:ASP | 评论:0 | 引用:0 | 查看:188
未知 清除asp缓存三个办法   [ 2010-04-19  |  本站原创 ]

清除asp缓存三个办法
1、在asp页面首部加入
response.buffer = true
response.expiresabsolute = now() - 1
response.expires = 0
response.cachecontrol = "no-cache"
response.addheader "pragma", "no-cache"
或者将此代码写到一个包含文件包含到asp文件里

2、在html代码中加入
<head>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
</head>

3、在重新调用原页面的时候在给页面传一个参数
href="****.asp?random()"



作者:admin | 分类:ASP | 评论:0 | 引用:0 | 查看:154

<%
function testurl(url)
dim httpxml
set httpxml = createobject("msxml2.xmlhttp")
httpxml.open "head",url,false
httpxml.send
if httpxml.status = 200 then
testurl = 1
else
testurl = 0
end if
set httpxml = nothing
end function

这里的200表示是200即访问正常如果是404是的话则说明页面不存在呵

下面是实例
if testurl("http://www.goldtimes.net/lspic/price/01-19.rar")=0 then
response.redirect "http://www.nmi.cn"
else
response.redirect "http://www.hnyp.cn"
end if

%>

以上是方法一,我写了一个更简单的供大家参考使用

---------------------------------------------------------

set xmlhttp =server.createobject("microsoft.xmlhttp")
xmlhttp.open("head","http://www.nmi.cn/index.htm",false)
xmlhttp.send()
if xmlhttp.status=200 then
'文件存在
end if



作者:admin | 分类:ASP | 评论:0 | 引用:0 | 查看:271

asp复制文件到其他文件夹下重新命名

 

<%on error resume next
dim fso,wj,path,filepath,foldername,newfilename,targetpath
wj="../index.html"
path="/wenjian/"
set fso=server.createobject("scripting.filesystemobject")
filepath=server.mappath(wj)'得到源文件路径
foldername=server.mappath(".")&path'得到新目录a路径
newfilename="other.html"'得到保存到a目录的新文件名
targetpath=foldername&""&newfilename'得到新文件完整路径
if fso.folderexists(foldername) then'判断a目录是否存在
fso.copyfile filepath,targetpath,true
else
fso.createfolder(foldername)'创建a目录
fso.copyfile filepath,targetpath,true
end if
set fso=nothing'释放内存
if err then
response.write err.description
end if
%>



作者:admin | 分类:ASP | 评论:0 | 引用:0 | 查看:345
未知 asp 防盗链   [ 2009-06-07  |  本站原创 ]

<!--#include file="include/agang_sql.asp"-->
<!--#include file="conn.asp"-->
 <%
server_v1=cstr(request.servervariables("http_referer"))
server_v2=cstr(request.servervariables("server_name"))
if mid(server_v1,12,len(server_v2))<>server_v2 and mid(server_v1,8,len(server_v2))<>server_v2  then
response.write "<script language=javascript>alert('非法操作');history.back(-1)</script>"
response.end
end if
%>
<%
set rs=server.createobject("adodb.recordset")
sql="select download from shop_goods where id="&request("id")        
rs.open sql,conn,1,1
url=""&rs(0)&""
response.redirect "http://download.nmi.cn:8081/"&url
response.end
rs.close                              
set rs=nothing                              
conn.close                              
set conn=nothing%>

 



作者:admin | 分类:ASP | 评论:0 | 引用:0 | 查看:265

    
 <%
server_v1=cstr(request.servervariables("http_referer"))
server_v2=cstr(request.servervariables("server_name"))
if mid(server_v1,8,len(server_v2))<>server_v2 then
response.write "<script language=javascript>alert('error');history.back(-1)</script>"
response.end
end if
%>

 

这是网络上公布的代码,其实是很不完善的。

忽略了有www和没有www的情形。

 

正确的写法:

 

    
    
 <%
server_v1=cstr(request.servervariables("http_referer"))
server_v2=cstr(request.servervariables("server_name"))
if mid(server_v1,12,len(server_v2))<>server_v2 and mid(server_v1,8,len(server_v2))<>server_v2  then
response.write "<script language=javascript>alert('error');history.back(-1)</script>"
response.end
end if
%>

 

在以下网站中测试通过

 

http://www.pany.net.cn

 

http://pany.net.cn

 

http://hainan.hnyp.cn



作者:admin | 分类:ASP | 评论:0 | 引用:0 | 查看:278
未知 让asp生成UTF-8格式   [ 2009-04-20  |  本站原创 ]
这里set myfile = fso.createtextfile(xmlfile,true)
再加上一个参数值"true"就行了,就这样
set myfile = fso.createtextfile(xmlfile,true,true)

作者:admin | 分类:ASP | 评论:0 | 引用:0 | 查看:251
未知 CInt与Int的区别   [ 2009-04-03  |  本站原创 ]


cint 会进行四舍五入取最接近它的偶数,也就是说当小数部分为0.5xxxx时,它会取最接近x.5xx的偶数.

如 cint(0.5)=0 ; cint(1.5)=2 ; cint(2.5)=2 ;cint(3.5)=4

而int就是取整函数,会去除小数点部分.如 int(1.5)=1 ...

作者:admin | 分类:ASP | 评论:0 | 引用:0 | 查看:244
未知 ASP CDate 函数   [ 2009-04-03  |  本站原创 ]
cdate函数能够将有效的日期或是时间表达式转换成为date类型并返回结果。

tip: use the isdate function to determine if date can be converted to a date or time.
提示:可以使用isdate函数来判断能否转换成为日期或是时间。

note: the isdate function uses local setting to determine if a string can be converted to a date ("january" is not a month in all languages.)
注意:isdate函数使用的是本地化设置来判断字符串是否能够转换成为日期("january"在所有语言中不一定代表为一个月份)

 

 

------------------------

d="april 22, 2001"
if isdate(d) then
document.write(cdate(d))
end if
output:
2/22/01


作者:admin | 分类:ASP | 评论:0 | 引用:0 | 查看:822
[1] [2] [3] 
Powered by Goldtimes.net © 2005-04 , Processed in 0.062500 second(s) , 5 queries