📄 makedirect.asp
字号:
<%
function makeonefenlei(tempid)
on error resume next
dim tempN,tempDir,tempFs
dim fenleidirect
Set makeoneRs = Server.CreateObject("ADODB.Recordset")
Set makeoneRs1 = Server.CreateObject("ADODB.Recordset")
sql="select * from fenlei where id="&tempid
tesponse.write sql
makeoneRs.open sql,conn,1,1
if makeoneRs.eof or makeoneRs.bof then
Response.Write "错误: 分类"&temp&"不存在!"
makeonefenlei=0
makeoneRs.close
set makeoneRs=nothing
set makeoneRs1=nothing
exit function
end if
expediency=makeoneRs("expediency")
tempDir=server.mapPath(dirstring&"navigate/")
Set tempFs=Server.CreateObject("Scripting.FileSystemObject")
for tempN=1 to expediency
sql="select * from fenlei where id="&makeoneRs(10+tempN)
makeoneRs1.open sql,conn,1,1
if makeoneRs1.eof or makeoneRs1.bof then
Response.Write "错误: 分类"&temp&"不存在!"
makeonefenlei=0
makeoneRs.close
set makeoneRs=nothing
makeoneRs1.close
set makeoneRs1=nothing
Set tempFs=nothing
exit function
end if
fenleidirect=trim(makeoneRs1("fenleidirect"))
if fenleidirect="" or isNull(fenleidirect) then fenleidirect=Cstr(makeoneRs(10+tempN))
tempDir=tempDir&"\"&fenleidirect
'response.write "<br>"&tempDir
if tempFs.FolderExists(tempDir) then
rem 目标目录已存在!"
else
rem 目标目录不存在-建立
tempFs.CreateFolder(tempDir)
end if
makeoneRs1.close
next
makeoneRs.close
set makeoneRs1=nothing
set tempFs=nothing
rem 得到分类所在目录
strFenleiDirect=tempDir
makeonefenlei=1
end function
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -