ÎÒдµÄÒ»¸öaspÉÏ´«×é¼þ
¡¡¡¡ÍøÉÏÁ÷´«µÄÖÖÖÖaspÉÏ´«ÀàÕæÊÇÌ«·³ËöÁË£¬ÎÒ×Ô¼ºÐ´ÁËÒ»¸öÉÏ´«Àà¡£Õâ¸öÉÏ´«ÀàÌå»ýºÜС£¬Ö»ÊÊÓÃÓÚµ¥ÎļþÉÏ´«£¬·µ»Ø½á¹ûÊÇÒ»¸öjson£¬¸ñʽΪ£º{"err":"³ö´íÔÒò","msg":"ÉÏ´«ÎļþµÄµØÖ·"}£¬ÀýÈ磺{"err":"\u6587\u4EF6\u592A\u5927\u4E86\2C\u4E0A\u4F20\u6587\u4EF6\u4E0D\u80FD\u8D85\u8FC7200K","msg":""}
»òÕß{"err":"","msg":"uploadfile/201013/7897896786.zip"}
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<%Option Explicit
Response.Buffer = True
response.charset = "gb2312"
Const uploadfolder="uploadpic"
Const allowExt="jpg,jpeg,gif,png,rar,doc,zip,xls,pdf,swf,avi,mp3,txt,htm,html"
Function BytestoStr(filestr)
dim skipflag : skipflag = 0
dim varlen,clow,i
dim content : content = ""
if not isnull(filestr) then
varlen = lenb(filestr)
for i=1 to varlen
if skipflag=0 then
clow = midb(filestr,i,1)
if ascb(clow) > 127 then
content = content & chr(ascw(midb(filestr,i+1,1) & clow))
skipflag = 1
else
content = content & chr(ascb(clow))
end if
else
skipflag = 0
end if
next
end if
BytestoStr = content
End Function
Function getFilepath(ext)
dim folderpath,fso,filename
folderpath=server.mappath(uploadfolder)
set fso=server.createobject("Scripting.FileSystemObject")
if Fso.FolderExists(folderpath)=false then fso.CreateFolder(folderpath)
folderpath=folderpath&"\"&replace(replace(date(),"/",""),"-","")
fileinfo=uploadfolder&date()
if Fso.FolderExists(folderpath)=false then fso.CreateFolder(folderpath)
filename=cstr(timer()*100)&"."&ext
getFilepath=folderpath&"\"&filename
fileinfo=fileinfo&"/"&filename
set Fso=nothing
End Function
Function CheckExt(fileinfo)
dim re
set re=new
Ïà¹ØÎĵµ£º
Õª×Ô£ºhttp://zxlh168.blog.163.com/blog/static/7778614020098168638654/
<%
’FSO×é¼þÃû³Æ
dim FSObject
FSObject="Scripting.FileSystemObject"
’=========================================================
’¡ôÊÇ·ñÖ§³Ö×é¼þ
’=============================================== ......
¡¡ASPÁ¬½ÓÊý¾Ý¿âµÄ11ÖÖ·½·¨——±¾ÎÄ×ܽáÁËʹÓÃASPÁ´½Ó¸÷ÖÖÊý¾Ý¿âµÄ·½·¨£º
¡¡¡¡1.AccessÊý¾Ý¿âµÄDSN-lessÁ¬½Ó·½·¨:
set adocon=Server.Createobject("adodb.connection")
adoconn.Open"Driver={Microsoft Access Driver(*.mdb)};DBQ="& _
Server.MapPath("Êý¾Ý¿âËùÔÚ·¾¶")
¡¡¡¡2.Access OLE DBÁ¬½Ó·½·¨£ ......
<div id="storyScroller" style="width:100%;height:140px;line-height:28px;overflow:hidden;">
<div id="storyScrollMid">
<ul id="storyScrollUl" style=" list-style-type:circle; list-style-position: outside; margin-left:18px; margin-right:0px">
<li>item01</l ......
<%
function dt(v)
dim dy
dy=31
Marr=array(4,6,9,11)
yyyy=Year(Date())
mm=Month(Date())
dd=Day(Date())
if mm=2 then
if yyyy mod 400 or (yyyy mod 4=0 and yyyy mod v0=0) then
dy=29
else
dy=28
end if
else
for i=0 to 3
......
ÔÚ½« ASP.NET Web ²¿¼þµÄ¼¯³É¿Ø¼þ¼¯ÖеĿؼþ°üÀ¨ÔÚÍøÒ³ÖÐʱ£¬ÕâЩ¿Ø¼þ½«×ñÊØ¸ÃÒ³µÄ¹æÔò£»¾ßÌå¶øÑÔ¾ÍÊÇ£¬ÕâЩ¿Ø¼þ½«ÔÚ¸ÃÒ³µÄÉúÃüÖÜÆÚÄÚÔËÐС£
ÿ¸öÍøÒ³¶¼¾ßÓÐÒ»¸öÉúÃüÖÜÆÚ£¬ÍøÒ³ÔÚÆäÉúÃüÖÜÆÚÄÚ½«Ö´ÐÐһϵÁд¦Àí²½Öè¡£ÕâЩ²½Öè°üÀ¨³õʼ»¯¡¢´´½¨¿Ø¼þ¡¢»¹ÔºÍά»¤×´Ì¬¡¢ÔËÐÐʼþ´¦Àí³ÌÐò´ú ......